I&#39;m in the process of porting code from Twisted 8.1 to 10.1 which needed some custom signal handling code.  Twisted 8.1&#39;s approach to signal handling was (as far as we could tell) too monolithic, so we chose &quot;installSignalHandlers=False&quot; and wrote our own signal handling code, installing reactor._handleSigchld so that spawnProcess would work.  Of course, we have to change this now since #733 was fixed (<a href="http://twistedmatrix.com/trac/ticket/733">http://twistedmatrix.com/trac/ticket/733</a>).<div>
<br></div><div>IIUC, (and please correct if I don&#39;t) the SIGCHLD handler installation is performed by twisted.internet.posixbase.PosixReactorBase._handleSignals (the &quot;if platformType == &#39;posix&#39;:&quot; block).  So, one option would be to run that code while still using &quot;installSignalHandlers=False&quot;.</div>
<div><br></div><div>I&#39;m wondering if there&#39;s a better way.  What if I were to let Twisted install signal handlers, but run my own signal handling code after the reactor starts (using callLater(0,...)) that installs &quot;super&quot; handlers which calls the Twisted handler along with any other handlers I want to run.  I&#39;d use signal.getsignal to get a reference to the Twisted handler(s).  Might this work?  Or, is there an obvious flaw?  In particular, can I get the SIGCHLD handler using signal.getsignal, then call it via my &quot;super&quot; handler?  I don&#39;t need to do any special handling of SIGCHLD, so I could just leave that signal handler alone.</div>
<div><br></div><div>All thoughts appreciated.</div><div><br>Thanks,</div><div><br>Jason<br clear="all"><br>-- <br>Jason Rennie<br>Research Scientist, ITA Software<br>617-714-2645<br><a href="http://www.itasoftware.com/" target="_blank">http://www.itasoftware.com/</a><br>

<br>
</div>