Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35081 > unrolled thread

Re: os.system and subprocess odd behavior

Started byCameron Simpson <cs@zip.com.au>
First post2012-12-19 10:03 +1100
Last post2012-12-19 10:03 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: os.system and subprocess odd behavior Cameron Simpson <cs@zip.com.au> - 2012-12-19 10:03 +1100

#35081 — Re: os.system and subprocess odd behavior

FromCameron Simpson <cs@zip.com.au>
Date2012-12-19 10:03 +1100
SubjectRe: os.system and subprocess odd behavior
Message-ID<mailman.1035.1355871807.29569.python-list@python.org>
On 18Dec2012 05:39, Dave Angel <d@davea.name> wrote:
| On 12/18/2012 05:27 AM, Hans Mulder wrote:
| > On 18/12/12 06:10:43, photonymous@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
resource issue.

OTOH, a child process that is still active (pointlessly) might be a
problem...
-- 
Cameron Simpson <cs@zip.com.au>

My initial work-around is to rebuild history.
        - gary@sci34hub.sci.com (Gary Heston)

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web