os.system and subprocess odd behavior
cs at zip.com.au
Wed Dec 19 00:03:16 CET 2012
On 18Dec2012 05:39, Dave Angel <d at davea.name> wrote:
| On 12/18/2012 05:27 AM, Hans Mulder wrote:
| > On 18/12/12 06:10:43, photonymous at gmail.com wrote:
| >> I hope I understand the question... but shouldn't you wait for the process to complete before exiting?
| >> Something like:
| >> pid = subprocess.Popen(...)
| >> pid.wait()
| >> Otherwise, it'll exit before the background process is done.
| > Why would that be a problem?
| Because you don't want to bog the system down with a zombie task.
A zombie task is just a process table slot; it costs the system almost
nothing. It is untidy but except in extreme cases, not a performance or
OTOH, a child process that is still active (pointlessly) might be a
Cameron Simpson <cs at zip.com.au>
My initial work-around is to rebuild history.
- gary at sci34hub.sci.com (Gary Heston)
More information about the Python-list