[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Interaction of os calls and \r Partial answer
- From: Jose Torre-Bueno <jtorrebueno@...>
- Date: Tue, 14 May 2013 14:50:28 -0700
On May 14, 2013, at 2:34 PM, Coda Highland <email@example.com> wrote:
> On Tue, May 14, 2013 at 2:31 PM, Jose Torre-Bueno <firstname.lastname@example.org> wrote:
>> The question remains why does an os call create a need to flush the stdout buffer?
> Seems like a pretty obvious answer to me: The child process has a
> stdout stream (whether it uses it or not). When the child process
> exits, it closes its stream, which flushes stdout.
> /s/ Adam
Do I understand you correctly that when the child process closes its stream the parent's stdout stream gets flushed to nowhere? This seems to be the case since turning off buffering or explicitly calling flush before the os call works. I guess I did not realize a child process could impact its parent's output stream.