Re: os.system and subprocess odd behavior

Discussion in 'Python' started by Cameron Simpson, Dec 18, 2012.

  1. On 18Dec2012 05:39, Dave Angel <> wrote:
    | On 12/18/2012 05:27 AM, Hans Mulder wrote:
    | > On 18/12/12 06:10:43, 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 <>

    My initial work-around is to rebuild history.
    - (Gary Heston)
     
    Cameron Simpson, Dec 18, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    518
    Bruce Barker
    Jun 21, 2005
  2. Michael Speer

    Odd behavior with odd code

    Michael Speer, Feb 16, 2007, in forum: C Programming
    Replies:
    33
    Views:
    1,159
    Richard Heathfield
    Feb 18, 2007
  3. hiral
    Replies:
    2
    Views:
    630
    Jean-Michel Pichavant
    May 5, 2010
  4. m
    Replies:
    3
    Views:
    308
  5. py_genetic

    os.system and subprocess odd behavior

    py_genetic, Dec 14, 2012, in forum: Python
    Replies:
    19
    Views:
    366
    Hans Mulder
    Dec 18, 2012
Loading...

Share This Page