This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PR-673


>>>>> Roland McGrath writes:

 > There is a complex set of rules POSIX defines (1003.1-1996 8.2.3, p 212)
 > for what is legal in these situations.  The short version is that the
 > program should do fflush before fork, or use only _exit in the child.
 > (Various other things are acceptable too, but they are all other things
 > that amount to having recently flushed buffers before fork.)

I just checked Tuomas Heino's mail with fork_debug-0.3.  He uses
fflush (NULL) before calling fork and exit which shows the problem.
Using _exit instead of exit fixes the problem.  But shouldn't it work
with fflush also (according to your description)?  Sorry, I don't have
the standard here and can't check what's right or not.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@alma.student.uni-kl.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]