[New-bugs-announce] [issue8056] Piped parent's multiprocessing.Process children cannot write to stdout

Vilnis Termanis report at bugs.python.org
Thu Mar 4 16:27:08 CET 2010


New submission from Vilnis Termanis <vilnis.termanis at googlemail.com>:

Affects Win32 only (tested under Ubuntu 9.10-64 and XP-32 with v2.6.4). If script output is piped, child processes created via multiprocessing.Process cannot write to stdout. Also, trying to call stdout.flush() in child processes causes IOError.

Normal behaviour
----------------
C:\>stdout.py
[Parent] stdout: <open file '<stdout>', mode 'w' at 0x00A54070>
[Parent] message via stdout

[Child] stdout: <open file '<stdout>', mode 'w' at 0x00A54070>
[Child] message via stdout

Piped behaviour (same result if redirecting to file)
---------------
C:\>stdout.py | cat
[Parent] stdout: <open file '<stdout>', mode 'w' at 0x00A54070>
[Parent] message via stdout

[Child] stdout: <open file '<stdout>', mode 'w' at 0x00A54070>
Process Process-1:
Traceback (most recent call last):
  File "C:\Python26\lib\multiprocessing\process.py", line 232, in _bootstrap
    self.run()
  File "C:\Python26\lib\multiprocessing\process.py", line 88, in run
    self._target(*self._args, **self._kwargs)
  File "C:\stdout.py", line 18, in child
    stdout.flush()
IOError: [Errno 9] Bad file descriptor

----------
components: Library (Lib), Windows
files: stdout.py
messages: 100390
nosy: vilnis.termanis
severity: normal
status: open
title: Piped parent's multiprocessing.Process children cannot write to stdout
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file16432/stdout.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8056>
_______________________________________


More information about the New-bugs-announce mailing list