Race in registerReapProcessHandler
[email protected] Tue, 13 Oct 2009 12:43:21 -0000
| Newsgroups | gmane.comp.python.twisted.bugs |
|---|---|
| Message-ID | <[email protected]> |
New submission from spiv <[email protected]>: `registerReapProcessHandler` calls `os.waitpid` before adding the pid to the `reapProcessHandlers` dict. But if a SIGCHLD occurs between the `waitpid` and updating the dict then the child will not be reaped (until the next SIGCHLD, anyway). The attached patch is a quick, untested fix for this hole. A better fix would probably not muck with SIGCHLD unless Twisted's own _SignalReactorMixin._handleSigchld had been registered in the first place, so as to remove any possible disturbance to non-Twisted SIGCHLD handlers. ---------- Type : defect Component: core Keywords : Priority : normal Nosy : ---------- http://twistedmatrix.com/trac/ticket/4056