*/ void dispatch_signal(const int signo) { int stop = 0; sigset_t oset; struct sigaction curact; sigaction(signo, NULL, &curact); /* SIG_IGN => noop or soak up child term/stop signals (for CHLD) */ if (SIG_IGN == curact.sa_handler) { if (SIGCHLD == signo) { int status...
# 需要导入模块: import signal [as 别名]# 或者: from signal importSIG_DFL[as 别名]def__call__(self, *args, **kwargs):"""Trap ``SIGTERM`` and call wrapped function."""self._caught_signal =None# Register handler for SIGTERM, then call `self.func`self.old_signal_handler = signal.ge...