[Zope] defunct process with os.spawn*

Jonathan dev101 at magma.ca
Wed Aug 2 13:59:20 EDT 2006


----- Original Message ----- 
From: "Alan" <alanwilter at gmail.com>
To: <zope at zope.org>
Sent: Wednesday, August 02, 2006 1:52 PM
Subject: [Zope] defunct process with os.spawn*


> Dears,
>
> Now I am facing an annoying problem.
>
> I have an application in Zope which calls a External Method, which
> calls a bash script via:
>
> var_pid = os.spawnlp(os.P_NOWAIT, 'script.sh', 'script.sh', arg1,arg2)
>
> The idea is to start some programs in background (which will take
> hours running) and I need to pass arguments and track its PID for
> eventually checking its status. So os.spawnlp seemed the perfect
> solution.
>
> However, when my bash script finished, my processes gets <defunct>
> childed to the Zope process. And only restarting Zope to get rid of
> such defunct process, an unthinkable solution.

It sounds like you are generating zombie processes (child processes which 
have completed, but are not handled by the processes that spawned them). Try 
googling:  python reap spawned process


Jonathan




More information about the Zope mailing list