static void pcntl_signal_handler(int signo) { if (signo > 0 && signo < _NSIG && signalHandlersInited()) { s_signal_handlers->signaled[signo] = 1; RequestInjectionData &data = ThreadInfo::s_threadInfo.getNoCheck()-> m_reqInjectionData; data.setSignaledFlag(); } }
bool HHVM_FUNCTION(pcntl_signal_dispatch) { if (!signalHandlersInited()) return true; int *signaled = s_signal_handlers->signaled; for (int i = 0; i < _NSIG; i++) { if (signaled[i]) { signaled[i] = 0; if (s_signal_handlers->handlers.exists(i)) { vm_call_user_func(s_signal_handlers->handlers[i], make_packed_array(i)); } } } return true; }
static void pcntl_signal_handler(int signo) { if (signo > 0 && signo < _NSIG && signalHandlersInited()) { s_signal_handlers->signaled[signo] = 1; setSurpriseFlag(SignaledFlag); } }