Closed
Description
From g.rodola on October 11, 2010 20:41:56
This would be the same as subprocess.Popen.wait() (
http://docs.python.org/library/subprocess.html#subprocess.Popen.wait
) and it would be useful to wait for a process to terminate after a
kill(), terminate() or send_signal() call in a "clean" way by also
returning the process exit code.
subprocess module uses WaitForSingleObject() on Windows and
os.waitpid() on Unix.
The latter one is already used in the test suite:
https://code.google.com/p/psutil/source/browse/trunk/test/test_psutil.py?spec=svn671&r=666#75
A further functionality I'd like to have is the possibility to set a timeout.
There's a patch on the python bug tracker which already do this that
we can take as an example: http://bugs.python.org/issue5673
Original issue: http://code.google.com/p/psutil/issues/detail?id=116