On 8/27/2012 11:26 PM, thoni56 wrote: > Is this a known behaviour? Unavoidable in cygwin? (Obviously not, if I'm on > the right track with my guesswork...) If it is a bug, will it be fixed?
This behavior isn't Cygwin-specific. In fact, it's longstanding Unix behavior. (The buffering problem is one reason you should, generally speaking, use _exit(2), not exit(3), in a forked child.) Calling fflush(NULL) before the fork will flush all stdio buffers for you and eliminate the problem, assuming you're single-threaded.
signature.asc
Description: OpenPGP digital signature