This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/56016] mutlithreading problem with iostream
- From: "bugs at justexpired dot e4ward.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Jan 2013 17:24:52 +0000
- Subject: [Bug libstdc++/56016] mutlithreading problem with iostream
- Auto-submitted: auto-generated
- References: <bug-56016-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56016
--- Comment #2 from JxP <bugs at justexpired dot e4ward.com> 2013-01-17 17:24:52 UTC ---
Created attachment 29195
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29195
sample program not mixing iostream with stdio
I confirm that using ios_base::sync_with_stdio(false) makes the original
program run correctly (use argument 3 for that).
However, I would expect that after commenting out all fprintf(stderr) lines,
the program should work correctly even without that extra command (still use
argument 2 for that), because then it doesn't explicitly use any stdio
routines. But it doesn't. To see it fail now that we don't trace steps on
stderr, follow the steps in the original post, use argument 2, then at the end
type jobs to see the first cat still running.
Why would the user be expected to ask iostream not to sync with stdio, if stdio
isn't used?!