Message262407
I pushed a change based on multiprocessing_no_close_fd.patch. I changed multiprocessing.util._close_stdin() to try to replace sys.stdin with os.devnull even if stdin.close() raised an exception. Since stdin is read-only, I don't expect an exception on stdin.close(), but it's just in case :-) What do you think? Is it better to keep stdin if stdin.close() raises an exception?
I hate having to push changes without careful review. I wanted to fix buildbots as soon as possible. I'm working hard since 1 week to fix all random bugs on buildbots, so it's annoying when *all* buildbots are red :-/
I will read again the change later, but IMHO the approach is the good one. Python initialization also creates files (stdin, stdout, stderr) with closefd=False.
The change should be backported to Python 3.5. I'm waiting for buildbots and I have to read again the change later.
Note: It looks like all ResourceWarning of unit tests are now fixed. The following change succeed:
./python -Werror -m test -j0 test_multiprocessing_fork.py test_multiprocessing_forkserver.py test_multiprocessing_spawn.py test_multiprocessing_main_handling.py |
|
Date |
User |
Action |
Args |
2016-03-25 08:41:26 | vstinner | set | recipients:
+ vstinner, pitrou, jnoller, python-dev, sbt, martin.panter, serhiy.storchaka, davin |
2016-03-25 08:41:25 | vstinner | set | messageid: <1458895285.96.0.569113227552.issue25654@psf.upfronthosting.co.za> |
2016-03-25 08:41:25 | vstinner | link | issue25654 messages |
2016-03-25 08:41:25 | vstinner | create | |
|