def _handleSignals(self): # Bypass installing the child waker, for now _SignalReactorMixin._handleSignals(self) try: signal.set_wakeup_fd(self._signal_fds.writer_fileno()) except ValueError: pass
def _handleSignals(self): """ Extend the basic signal handling logic to also support handling SIGCHLD to know when to try to reap child processes. """ _SignalReactorMixin._handleSignals(self) if platformType == 'posix' and processEnabled: if not self._childWaker: self._childWaker = _SIGCHLDWaker(self) self._internalReaders.add(self._childWaker) self.addReader(self._childWaker) self._childWaker.install() # Also reap all processes right now, in case we missed any # signals before we installed the SIGCHLD waker/handler. # This should only happen if someone used spawnProcess # before calling reactor.run (and the process also exited # already). process.reapAllProcesses()
def _handleSignals(self): """ Extend the basic signal handling logic to also support handling SIGCHLD to know when to try to reap child processes. """ _SignalReactorMixin._handleSignals(self) if platformType == "posix" and processEnabled: if not self._childWaker: self._childWaker = _SIGCHLDWaker(self) self._internalReaders.add(self._childWaker) self.addReader(self._childWaker) self._childWaker.install() # Also reap all processes right now, in case we missed any # signals before we installed the SIGCHLD waker/handler. # This should only happen if someone used spawnProcess # before calling reactor.run (and the process also exited # already). process.reapAllProcesses()