Problem piping stdout

John (Eljay) Love-Jensen eljay@adobe.com
Sun Oct 1 16:20:00 GMT 2006


Hi Owen,

You probably want to set the terminal into unbuffered mode.

Google turned up...

http://cboard.cprogramming.com/archive/index.php/t-27714.html

Note:  your question is not a GCC question, it's a general Unix question.

Personally, for unbuffered interactive input at the terminal, I like to use ncurses 5.5 <http://www.gnu.org/software/ncurses/>.  The ncurses library handles putting the tty into the correct mode, and restoring back to the regular mode when finished.

If you find that your tty has gone all pear-shaped, here's the magic command to restore it to sanity:
stty sane

HTH,
--Eljay



More information about the Gcc-help mailing list