This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients jort.bloem, r.david.murray, vstinner
Date 2013-02-19.00:49:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361234951.2.0.363897679769.issue17230@psf.upfronthosting.co.za>
In-reply-to
Content
I can reproduce the issue using "python test.py|cat". The problem is that sys.stdout is buffered and the buffer is flushed twice: once in the parent, once in the child. Just call sys.stdout.flush() before os.fork() should fix your issue.

I don't think that Python should flush buffers of all streams before fork, so I propose to close this issue. Except if you see something interesting to add to Python documentation.
History
Date User Action Args
2013-02-19 00:49:11vstinnersetrecipients: + vstinner, r.david.murray, jort.bloem
2013-02-19 00:49:11vstinnersetmessageid: <1361234951.2.0.363897679769.issue17230@psf.upfronthosting.co.za>
2013-02-19 00:49:11vstinnerlinkissue17230 messages
2013-02-19 00:49:11vstinnercreate