Re: subprocess + python-daemon - bug/problem?

2009-09-16 Thread Ben Finney
Ben Finney writes: > I'm not familiar enough with the nuances of the ‘subprocess’ module to > know what might be going wrong here. I'd like to know whether it might > be a problem in the ‘python-daemon’ library. My test case for this is now:: = #! /usr/bin/python import daemon import os im

Re: subprocess + python-daemon - bug/problem?

2009-09-16 Thread Ben Finney
Joel Martin writes: > I'm running python-2.6.2 which supposedly has the fix for #1731717. > However I still still the problem with subprocess after daemonizing. > I've narrowed it down to just the setting of the SIGCLD signal. > > You can reproduce the problem thus (in 2.4.6, 2.5.4 and 2.6.2): >

Re: subprocess + python-daemon - bug/problem?

2009-09-16 Thread Joel Martin
On Sep 8, 5:19 pm, Ben Finney wrote: > Sewar writes: > > I looked at other daemon libraries and snippets, it's clearly the bug is in > > subprocess not python-daemon. > > Then I found Python bug #1731717 which discusses it. I'm running python-2.6.2 which supposedly has the fix for #1731717. Howe

Re: subprocess + python-daemon - bug/problem?

2009-09-08 Thread Ben Finney
Sewar writes: > I looked at other daemon libraries and snippets, it's clearly the bug is in > subprocess not python-daemon. > Then I found Python bug #1731717 which discusses it. Thank you very much! I'm glad to see this is a known issue and that some investigation has already been done. (It's a

Re: subprocess + python-daemon - bug/problem?

2009-09-08 Thread Sewar
I looked at other daemon libraries and snippets, it's clearly the bug is in subprocess not python-daemon. Then I found Python bug #1731717 which discusses it. I wish my project was opensource so I can post more specific test cases. #1731717 http://bugs.python.org/issue1731717 Thanks -- http://

Re: subprocess + python-daemon - bug/problem?

2009-09-05 Thread Sewar
I got the same bug. Traceback (most recent call last): File "./script1.py", line 30, in call(["python", "script2.py", "arg1"], stdout=sys.stdout, stderr=STDOUT) File "/usr/lib/python2.6/subprocess.py", line 444, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python

Re: subprocess + python-daemon - bug/problem?

2009-09-05 Thread Sewar
I got the same bug. Traceback (most recent call last): File "./script1.py", line 30, in call(["python", "script2.py", "arg1"], stdout=sys.stdout, stderr=STDOUT) File "/usr/lib/python2.6/subprocess.py", line 444, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python

Re: subprocess + python-daemon - bug/problem?

2009-08-13 Thread Ben Finney
Ben Finney writes: > My first thought was perhaps it's related to the fact that the process > has no stdout? But setting ‘stdout’ and ‘stderr’ to the same file:: > > #! /usr/bin/python > > import daemon > import subprocess > > fake_console = open("fake_console.txt", "w+") >

Email provider recommendations for those tired of mangled messages (was: subprocess + python-daemon - bug/problem?)

2009-07-10 Thread Ben Finney
Ben Finney writes: > Here it is without the unwanted extra line-wrapping that seems to > plague all Google Mail users (seriously, folks: get a real mail > provider that won't mangle your messages) I've been asked off-list whether I have any suggestions for those who want a better email provider.

Re: subprocess + python-daemon - bug/problem?

2009-07-10 Thread Ben Finney
Andy Clegg writes: > "import daemon > import subprocess > > daemon.DaemonContext(stderr = open("fakeConsole.txt","w+")).open() > subprocess.Popen(['echo','1']).wait()" > > However the error remains the same. The error appears in the file specified for the stderr output of the DaemonContext. H

Re: subprocess + python-daemon - bug/problem?

2009-07-09 Thread Andy Clegg
My apologies, the python code should have been: "import daemon import subprocess daemon.DaemonContext(stderr = open("fakeConsole.txt","w+")).open() subprocess.Popen(['echo','1']).wait()" However the error remains the same. Yours, Andy On Jul 9, 10:26 am, Andy Clegg wrote: > Hi all, > > I'm

subprocess + python-daemon - bug/problem?

2009-07-09 Thread Andy Clegg
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 subprocess.Popen('echo 1').wait() File "/usr/lib64/python