Ack! Zombie processes won't die!

Discussion in 'Python' started by Brian, Dec 22, 2004.

  1. Brian

    Brian Guest

    From one script, I'm spawnv'ing another that will launch mpg123 to play a
    specified mp3. Problem is that After the second script has launched
    mpg123, it'll turn into a zombie process. It doesn't happen when I launch
    it from the command line, so there's something wrong with the way I'm
    calling it (I believe).

    mp3pid = os.spawnv(os.P_NOWAIT, "/oter/playfile.py", ["playfile", filename,
    "0"])

    Shouldn't this launch the script without waiting for it to finish?
    Brian, Dec 22, 2004
    #1
    1. Advertising

  2. Brian

    Keith Dart Guest

    Brian wrote:
    > From one script, I'm spawnv'ing another that will launch mpg123 to play a
    > specified mp3. Problem is that After the second script has launched
    > mpg123, it'll turn into a zombie process. It doesn't happen when I launch
    > it from the command line, so there's something wrong with the way I'm
    > calling it (I believe).
    >
    > mp3pid = os.spawnv(os.P_NOWAIT, "/oter/playfile.py", ["playfile", filename,
    > "0"])
    >
    > Shouldn't this launch the script without waiting for it to finish?


    It does, but the OS keeps the process information around until you
    "wait" on it, with "reaps", or collects the exit status then. You can do
    this asyncronously with a SIGCHLD handler. However, this has already
    been done.

    In the the pyNMS package on sourceforge
    (http://sourceforge.net/projects/pynms) there is a module called
    "proctools". It has a process manager that does this for you.


    --
    -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Keith Dart <>
    public key: ID: F3D288E4
    =====================================================================
    Keith Dart, Dec 22, 2004
    #2
    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. Lloyd Sheen

    Die IDE Die

    Lloyd Sheen, Jan 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    428
    Natty Gur
    Jan 26, 2004
  2. Lloyd Sheen

    More Die IDE Die

    Lloyd Sheen, Jan 24, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    447
    Alvin Bruney
    Jan 25, 2004
  3. Replies:
    0
    Views:
    512
  4. Navkirat Singh

    Multiprocessing zombie processes

    Navkirat Singh, Jul 25, 2010, in forum: Python
    Replies:
    0
    Views:
    269
    Navkirat Singh
    Jul 25, 2010
  5. serge.john.swilting

    plouk zombie plouk zombie

    serge.john.swilting, Aug 19, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    197
    hudson
    Aug 20, 2003
Loading...

Share This Page