in reply to can you autoflush a program in unix?
Yes and no.
The buffering in question is done entirely in the program. Unless the program gives you a means of controlling its flushing mechanism, you're out of luck.
However, most applications will automatically flush STDOUT (after each newline) when it's connected to a tty. You can fool such applications by using a pseudo tty. IPC::Run makes it easy to use a pseudo tty. See IO::Pty
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: can you autoflush a program in unix?
by zwon (Abbot) on Oct 20, 2009 at 19:16 UTC | |
by ikegami (Patriarch) on Oct 20, 2009 at 19:33 UTC | |
|
Re^2: can you autoflush a program in unix?
by windowbreaker (Sexton) on Oct 20, 2009 at 19:02 UTC | |
by ikegami (Patriarch) on Oct 20, 2009 at 20:20 UTC | |
|
Re^2: can you autoflush a program in unix?
by Anonymous Monk on Oct 20, 2009 at 18:54 UTC | |
by ikegami (Patriarch) on Oct 20, 2009 at 20:21 UTC | |
by Anonymous Monk on Oct 21, 2009 at 14:56 UTC |