subprocess.Popen zombie
Cecil Westerhof
Cecil at decebal.nl
Wed May 20 10:48:22 EDT 2015
Op Wednesday 20 May 2015 15:16 CEST schreef Robin Becker:
> As part of a long running PyQT process running as a window app in
> Arch linux I needed an alert sound, I decided to use the beep
> command and the app code then looked like
>
> pid = Popen(['/home/robin/bin/mybeep', '-r3', '-f750', '-l100',
> '-d75']).pid
>
> the mybeep script handles module loading if required etc etc.
>
> Anyhow, this works with one slight oddity. When this code is
> executed it works fine, but leaves behind a single zombie process,
> when next executed the zombie disappears and a new zombie replaces
> it.
>
> Is this because I'm not waiting? Does the process module reap
Yes, you should do a:
pid.wait()
Should not be a problem, because the program you are calling takes
very little time.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
More information about the Python-list
mailing list