classification
Title: subprocess module does not accept file twice
Type: crash Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: out of date
Dependencies: Superseder: webbrowser.open on unix fails.
View: 11432
Assigned To: Nosy List: catalin.iacob, neologix, zmk
Priority: normal Keywords:

Created on 2011-05-08 16:18 by zmk, last changed 2011-05-08 17:18 by neologix. This issue is now closed.

Files
File name Uploaded Description Edit
test.py zmk, 2011-05-08 16:18 testcase
Messages (3)
msg135530 - (view) Author: marko kreen (zmk) Date: 2011-05-08 16:18
I want to pass /dev/null as stdin and stderr.

This works from python 2.4 .. 3.2a3

It fails in final 3.2 with 'Bad file descriptor':

Traceback (most recent call last):
  File "test.py", line 11, in <module>
    Popen(['cat', 'file.txt'], stdout = PIPE, stdin = _in, stderr = _err)
  File "/opt/apps/python320/lib/python3.2/subprocess.py", line 736, in __init__
    restore_signals, start_new_session)
  File "/opt/apps/python320/lib/python3.2/subprocess.py", line 1330, in _execute_child
    raise child_exception_type(errno_num, err_msg)
OSError: [Errno 9] Bad file descriptor
msg135532 - (view) Author: Catalin Iacob (catalin.iacob) * Date: 2011-05-08 17:09
I can reproduce this on 3.2 final but not on the tip of the 3.2 branch so it seems to have been fixed.
msg135534 - (view) Author: Charles-Fran├žois Natali (neologix) * (Python committer) Date: 2011-05-08 17:18
It's a duplicate of issue #11432: http://bugs.python.org/issue11432
History
Date User Action Args
2011-05-08 17:18:03neologixsetstatus: open -> closed

nosy: + neologix
messages: + msg135534

superseder: webbrowser.open on unix fails.
resolution: out of date
2011-05-08 17:09:34catalin.iacobsetnosy: + catalin.iacob
messages: + msg135532
2011-05-08 16:18:53zmkcreate