diff options
Diffstat (limited to 'Lib/multiprocessing/popen_fork.py')
-rw-r--r-- | Lib/multiprocessing/popen_fork.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/multiprocessing/popen_fork.py b/Lib/multiprocessing/popen_fork.py index d2ebd7c..5d0fa56 100644 --- a/Lib/multiprocessing/popen_fork.py +++ b/Lib/multiprocessing/popen_fork.py @@ -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._launch(process_obj) |