runCommand/waitForProcess don't respect text printing order whenstdout is redirected

Bayley, Alistair Alistair.Bayley at
Fri Aug 1 10:25:31 EDT 2008

> From: libraries-bounces at 
> [mailto:libraries-bounces at] On Behalf Of Alfonso Acosta
> The following program behaves as expected when run on a terminal.
> However, when stdout is redirected to a file, the order is no 
> longer respected:

Possibly buffering? I think the terminal has line buffering by default,
whereas files are usually block-buffered. Try changing the buffering to

  hSetBuffering stdout LineBuffering

Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.

More information about the Libraries mailing list