Re: Process monitoring

2005-05-29 Thread gsteff
Thanks- subprocess was exactly what I needed.  For anyone else that
reads this, I just launched a new subprocess via subprocess.Popen, did
what I needed to do in a while look, while calling the poll method of
the Popen object to check whether it was finished, and if so, what its
error code was.  Pretty simple.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Process monitoring

2005-05-20 Thread John Abel
gsteff wrote:

>Hey, I'm working on a Python program that will launch some other
>non-Python process using os.spawn (in the os.P_NOWAIT mode) and then
>basically wait for it to finish (while doing some other stuff in the
>interim).  Normally, the new process will signal that it's done by
>writing to a file, but I'd like to also find out if the new process
>died unexpectedly.  Anyone know any preferrable ways to do this?
>
>Greg Steffensen
>
>  
>
If you're using 2.4, have a look at the subprocess module.

J
-- 
http://mail.python.org/mailman/listinfo/python-list


Process monitoring

2005-05-19 Thread gsteff
Hey, I'm working on a Python program that will launch some other
non-Python process using os.spawn (in the os.P_NOWAIT mode) and then
basically wait for it to finish (while doing some other stuff in the
interim).  Normally, the new process will signal that it's done by
writing to a file, but I'd like to also find out if the new process
died unexpectedly.  Anyone know any preferrable ways to do this?

Greg Steffensen

-- 
http://mail.python.org/mailman/listinfo/python-list