[Zope] defunct process with os.spawn*

Alan alanwilter at gmail.com
Wed Aug 2 13:52:25 EDT 2006


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.

I am running:

Plone 2.1.2,
Zope (Zope 2.8.5-final, python 2.3.5, sunos5),
Python 2.3.5 (#1, Feb 14 2006, 10:51:41) [C],
-- 
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
>>http://www.bio.cam.ac.uk/~awd28<<


More information about the Zope mailing list