> The default stdin doesn't have an end, and unless you type something > in, there's no input at all. That's why the program just hangs. You can end keyboard stdin by typing ^D (Ctrl + D) under unix.