Issue 12031: subprocess module does not accept file twice (original) (raw)
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 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