This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37785] printf without '\n' + sleep = problems with output buffer
- From: "alexcastan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2008 20:24:37 -0000
- Subject: [Bug c/37785] printf without '\n' + sleep = problems with output buffer
- References: <bug-37785-16813@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from alexcastan at gmail dot com 2008-10-09 20:24 -------
Then the second problem it is also the normal behavior. The fork()
makes child inherit the unprinted parent buffer, then two similar buffers get
print later.
10 9 8 7 6 5 4 3 2 1 0 I'm the child
10 9 8 7 6 5 4 3 2 1 0 I'm the parent
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37785