I have a simple haskell program, which do
- prompt some message to user, with '\n'
- waiting for user input
- print user's input
If I launch the program from a command prompt or from a cygwin shell which is launched from a command prompt, it is ok.
But if I launch the program from ssh shell which is connected to a local cygwin environment, the program don't write anything back to terminal until it exit. It looks like the buffer for STDOUT in ssh shell is not line buffered but block buffered.
I don't want to flush manually. How do I fix the problem?