subprocess + python-daemon - bug/problem?
Andy Clegg
andy2.0 at gmail.com
Thu Jul 9 05:26:10 EDT 2009
Hi all,
I'm trying to daemonize a python program, and occasionally have it run
subprocesses, however I'm running into a nasty error, as follows:
"File "/users/rsg/ancl/devcocast/devcocast-svn/scripts/DaemonSpawnTes
t.py", line 5, in <module>
subprocess.Popen('echo 1').wait()
File "/usr/lib64/python2.5/subprocess.py", line 594, in __init__
errread, errwrite)
File "/usr/lib64/python2.5/subprocess.py", line 1089, in _execute_ch
ild
os.waitpid(self.pid, 0)
OSError: [Errno 10] No child processes"
The minimal testcase showing this problem is as follows:
"import daemon
import subprocess
daemon.DaemonContext(stderr = open("fakeConsole.txt","w+")).open()
subprocess.Popen('echo 1').wait()"
So there is no threading going on (I've found some bugs relating to
subprocess and threading). I'm using Fedora 10, Python 2.5.2, and
python-daemon 1.4.6 from here http://pypi.python.org/pypi/python-daemon/
.
If anyone can shed some light on the situation, I'd be extremely
grateful!
Yours,
Andy
More information about the Python-list
mailing list