This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Problem piping stdout
- From: "John \(Eljay\) Love-Jensen" <eljay at adobe dot com>
- To: "Owen Lucas" <owen dot lucas at student dot adelaide dot edu dot au>, <gcc-help at gcc dot gnu dot org>
- Date: Sun, 1 Oct 2006 09:17:09 -0700
- Subject: RE: Problem piping stdout
- References: <1159709654.451fc3d67797a@webmail.adelaide.edu.au> <1159710843.451fc87b708f8@webmail.adelaide.edu.au>
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