lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On May 14, 2013, at 2:34 PM, Coda Highland <chighland@gmail.com> wrote:

> On Tue, May 14, 2013 at 2:31 PM, Jose Torre-Bueno <jtorrebueno@cox.net> 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
> 


Thanks
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.