<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 15, 2014, at 6:38 AM, Itamar Turner-Trauring <<a href="mailto:itamar@itamarst.org">itamar@itamarst.org</a>> wrote:</div><br><blockquote type="cite"><div style="font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">In this particular case, the traceback plus some googling (<a href="http://bugs.python.org/issue11768">http://bugs.python.org/issue11768</a> is what I found, presumably a different bug though) suggests the bug may be something like signal handler not being re-entrant for some reason and you're getting SIGCHLD just in the C code handling SIGCHLD. Try disabling SIGCHLD and just calling "twisted.internet.process.reapAllProcesses()" a few times a second and see if that's a good workaround - if so, add a note to the bug. If that is the case you may be able to reproduce the bug by setting a SIGCHLD handler and then sending SIGCHLD to the process a lot, no Twisted involved.</div></blockquote></div><br><div>This was also my reading of the stack trace.  Thanks for finding the reference in the Python bug tracker.</div><div><br></div><div>The one thing that confused me was that the sample program appeared to be running the program only once a second, and waiting for it to complete before running it again.  So how would the signal handler be re-entrant?  Perhaps 'pmset' runs a subprocess of its own so that the parent process receives <i>two</i> SIGCHLDs?</div><div><br></div><div>It looks like this fix might have been included in 2.7.6, since it was fixed on the 2.7 branch.  Has it been?</div><div><br></div><div>-glyph</div><div><br></div></body></html>