[New-bugs-announce] [issue14091] python subprocess hangs if script called from another directory
Massimo Paladin
report at bugs.python.org
Wed Feb 22 23:00:04 CET 2012
New submission from Massimo Paladin <massimo.paladin at gmail.com>:
Here is the behavior I am getting only on Python 2.7.2 in a Fedora 16:
$ cat /tmp/example.py
from subprocess import Popen,PIPE
args = "whatever program".split()
p = Popen(args)
If I run the program with:
$ cd /tmp/; python example.py
I get following as expected
Traceback (most recent call last):
File "example.py", line 7, in <module>
p = Popen(args)
File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1228, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Instead if I run the program with:
$ cd ~; python /tmp/example.py
It hangs until I stop it with ctrl-c
On the same machine python 3.2.1 works fine.
On a mac with python 2.7.1 works fine.
On a rhel5 with python 2.4 works fine too.
----------
components: None
messages: 153994
nosy: Massimo.Paladin
priority: normal
severity: normal
status: open
title: python subprocess hangs if script called from another directory
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14091>
_______________________________________
More information about the New-bugs-announce
mailing list