Message151886
> I propose applying the following patch.
The test looks good to me (except we don't remove TESTFN explicitely,
but I'm not sure it's really necessary).
As for the patch, couldn't we put all the file stream flushing in one place?
stdout and stderr are already flushed on Unix (which explains why this
only happens on Windows: the libc puts non-tty streams in _IOFBF, so
this wouldn't work without explicit flushing neither).
Lib/multiprocessing/forking.py:Popen.__init__:
code = process_obj._bootstrap()
sys.stdout.flush()
sys.stderr.flush()
os._exit(code)
Also, there's already a flush() a couple lines above (in _bootstrap):
sys.stderr.write(e.args[0] + '\n')
sys.stderr.flush()
So I'd suggest to just put:
sys.stdout.flush()
sys.stderr.flush()
At the end of _bootstrap, and remove the flushing done by
Popen.__init__ on Unix. |
|
Date |
User |
Action |
Args |
2012-01-24 09:07:40 | neologix | set | recipients:
+ neologix, pitrou, jnoller, brandjon |
2012-01-24 09:07:39 | neologix | link | issue13812 messages |
2012-01-24 09:07:38 | neologix | create | |
|