I use htmldoc to create pdf docs out of Zope. Basically I construct the html page I want to print, and use popen3() to write the html to the htmldoc program and fetch the pdf file and error file (if any). Most of the time it works fine. But occasionally the pdf is produced, no error message produced, and a Zombie process hanging around. There seems to be some correlation with the first print operation for a session creating a zombie. The python collector has several bugs related to the interaction of threads and popenN(), but it's unclear if they apply or how one might work around the problem? or even localize the problem? I suppose the simplest workaround would be to manage the pipes and htmldoc process myself rather than delegating it to popenN().
Dennis Allison wrote:
I suppose the simplest workaround would be to manage the pipes and htmldoc process myself rather than delegating it to popenN().
sounds like you might be getting pipe lock where two streams are blocking and so locking everything up... Have a look at this: http://cvs.zope.org/Packages/TestScripts/autotester.py.diff?r1=1.6&r2=1.7 ...which solved the problem outside of Zope when I ran into it. Be interesting to see how it fares fro mwithin Zope... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
I'm not sure that the problem is pipe lock. I will give it a try, however. On Tue, 25 May 2004, Chris Withers wrote:
Dennis Allison wrote:
I suppose the simplest workaround would be to manage the pipes and htmldoc process myself rather than delegating it to popenN().
sounds like you might be getting pipe lock where two streams are blocking and so locking everything up...
Have a look at this: http://cvs.zope.org/Packages/TestScripts/autotester.py.diff?r1=1.6&r2=1.7
...which solved the problem outside of Zope when I ran into it.
Be interesting to see how it fares fro mwithin Zope...
cheers,
Chris
-- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers -
Dennis Allison