mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed or None. (#4073)
This commit is contained in:
parent
73c4708630
commit
daeefd2e04
3 changed files with 30 additions and 2 deletions
|
@ -14,8 +14,14 @@ class Popen(object):
|
|||
method = 'fork'
|
||||
|
||||
def __init__(self, process_obj):
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
try:
|
||||
sys.stdout.flush()
|
||||
except (AttributeError, ValueError):
|
||||
pass
|
||||
try:
|
||||
sys.stderr.flush()
|
||||
except (AttributeError, ValueError):
|
||||
pass
|
||||
self.returncode = None
|
||||
self.finalizer = None
|
||||
self._launch(process_obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue