On 13 May 2010 02:01, Davo <[email protected]> wrote:
> Hi all,
>
> If I have a WSGI running as daemon mode and my python code is:
>
> p = subprocess.Popen(['watch -n 5 echo "aaa"'],
> stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
> shell=True).communicate()[0].strip('\n')
>
> The "watch" goes background and never ends. Even when I kill the wsgi
> daemon it still exists and changes its PPID (parent ID) to 1 (which
> means its becomes its own process instead of a child of any parent...)
> is there a way to prevent this? Cleanup all the childs or something
> when the daemon is restarted?

That process is what is called a zombie process. See:

  http://en.wikipedia.org/wiki/Zombie_process

It doesn't consume any actual resources and is merely an entry in the
operating systems process table which will exist until the process has
been waited upon to get its exit status. The operating system should
eventually forcibly reap process if parent doesn't.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to