Closed e070b1f7-4e7b-4562-9943-c9260e2621bb closed 13 years ago
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
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.
It's a duplicate of issue bpo-11432: http://bugs.python.org/issue11432
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = None closed_at =
created_at =
labels = ['library', 'type-crash']
title = 'subprocess module does not accept file twice'
updated_at =
user = 'https://bugs.python.org/zmk'
```
bugs.python.org fields:
```python
activity =
actor = 'neologix'
assignee = 'none'
closed = True
closed_date =
closer = 'neologix'
components = ['Library (Lib)']
creation =
creator = 'zmk'
dependencies = []
files = ['21935']
hgrepos = []
issue_num = 12031
keywords = []
message_count = 3.0
messages = ['135530', '135532', '135534']
nosy_count = 3.0
nosy_names = ['zmk', 'neologix', 'catalin.iacob']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = '11432'
type = 'crash'
url = 'https://bugs.python.org/issue12031'
versions = ['Python 3.2']
```