PR-673

Thomas Bushnell, BSG tb@MIT.EDU
Wed Aug 26 08:53:00 GMT 1998


   From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
   Date: 26 Aug 1998 10:32:58 +0200

   But the problem here is that the parent goes on reading from the stream
   maybe before the child does exit(), in which case it's the child's stream
   offset that becomes unaligned to the file offset, and then _IO_sync in the
   child will clobber the file offset again.  Does POSIX allow that?
   Normally you would either wait() for the child, or the child will just
   call execv(), in both cases all stdio streams will stay quiet.

Posix only allows that if the between a switch from parent-reading to
child-reading you do an fflush.

Thomas




More information about the Libc-hacker mailing list