The comment about passing installSignalHandlers=False to reactor.run() is good to know. Are the signal handlers Twisted installs used by Twisted for anything besides reactor.spawnProcess() or other tasks related to sub-process management?
-J On Mon, Apr 12, 2010 at 10:06 AM, David Ripton <drip...@ripton.net> wrote: > On 2010.04.12 09:39:21 -0600, Jason J. W. Williams wrote: >> Haven't had any issues yet. Twisted imports occur inside the process >> function. The app was originally written as a purely blocking >> multiprocessing app and rewritten to use Twisted inside the >> sub-processes. It's passed all automated and hand tests without an >> issue. Is there a reason importing Twisted inside sub-process should >> not work? > > Here's JP's canonical answer: > > http://stackoverflow.com/questions/1948641/twisted-threading-with-subprocess-popen > > I've seen this problem in real code. We had a PyGTK + Twisted program > that erroneously used subprocess in one place. 2% of the time, it > caused an exception. 98% of the time, it worked fine. Classic race > condition. Could be you have a similar bug but it never actually > manifests on your combination of code, OS, and hardware. Hard to say. > > -- > David Ripton drip...@ripton.net > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python