Author Valentin.Lorentz
Recipients Valentin.Lorentz
Date 2016-10-01.11:45:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

The following code:

import sys
import multiprocessing

sys.stdout.close()

def foo():
    pass

p = multiprocessing.Process(target=foo)
p.start()


Crashes with:

Traceback (most recent call last):
  File "foo.py", line 10, in <module>
    p.start()
  File "/usr/lib/python3.5/multiprocessing/process.py", line 105, in start
    self._popen = self._Popen(self)
  File "/usr/lib/python3.5/multiprocessing/context.py", line 212, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/usr/lib/python3.5/multiprocessing/context.py", line 267, in _Popen
    return Popen(process_obj)
  File "/usr/lib/python3.5/multiprocessing/popen_fork.py", line 17, in __init__
    sys.stdout.flush()
ValueError: I/O operation on closed file.


This bug has been reported to me on a daemonized program (written prior to PEP 3143).
History
Date User Action Args
2016-10-01 11:45:34Valentin.Lorentzsetrecipients: + Valentin.Lorentz
2016-10-01 11:45:34Valentin.Lorentzsetmessageid: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za>
2016-10-01 11:45:34Valentin.Lorentzlinkissue28326 messages
2016-10-01 11:45:34Valentin.Lorentzcreate