Take look at the poll() methods in the subprocess.py source file of
your Python install.
It shows how to use the os.wait_pid(pid, os.WNOHANG) to check whether a
process is still running or has terminated (and how, from the returned
status value).
Btw, on *nix you must call os.wait_pid(pid, ...) t
Take look at the poll() methods in the subprocess.py source file of
your Python install.
It shows how to use the os.wait_pid(pid, os.WNOHANG) to check whether a
process is still running or has terminated (and how, from the returned
status value).
Btw, on *nix you must call os.wait_pid(pid, ...) t
Am Thu, 02 Feb 2006 17:10:24 -0800 schrieb David Hirschfield:
> I'm launching a process via an os.spawnvp(os.P_NOWAIT,...) call.
> So now I have the pid of the process, and I want a way to see if that
> process is complete.
>
> I don't want to block on os.waitpid(), I just want a quick way to se
David Hirschfield <[EMAIL PROTECTED]> wrote:
> I'm launching a process via an os.spawnvp(os.P_NOWAIT,...) call.
> So now I have the pid of the process, and I want a way to see if that
> process is complete.
>
> I don't want to block on os.waitpid(), I just want a quick way to see if
> the proce
On Thu, Feb 02, 2006 at 05:10:24PM -0800, David Hirschfield wrote:
> I'm launching a process via an os.spawnvp(os.P_NOWAIT,...) call.
> So now I have the pid of the process, and I want a way to see if that
> process is complete.
>
> I don't want to block on os.waitpid(), I just want a quick way t
David Hirschfield <[EMAIL PROTECTED]> writes:
> So, should I run a monitor thread which just calls os.waitpid() and
> when the thread indicates via an event that the process completed, I'm
> golden?
Umm, what OS? And do you have any control over the program running in
the subprocess, or is it doi
I'm launching a process via an os.spawnvp(os.P_NOWAIT,...) call.
So now I have the pid of the process, and I want a way to see if that
process is complete.
I don't want to block on os.waitpid(), I just want a quick way to see if
the process I started is finished. I could popen("ps -p %d" % pid)