in reply to Long Process Waits Until End to Display Results
Second, it could be in the $my_long_process program. Many programs, and the default stdio library, buffer output unless it's to a tty. If that's the case with $my_long_process program, it wouldn't buffer output when you ran it from the command-line (because it was connected to a tty), but would when run from your program. You might be able to test by running:
to see if it buffers output then.$my_long_program |cat
If that's the case, finding an option to cause the program to display output immediately is the easiest solution; the other option is to connect it to a pseudo-tty, with something like Expect.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Long Process Waits Until End to Display Results
by C_T (Scribe) on Dec 07, 2004 at 18:26 UTC |