static void swSignal_async_handler(int signo) { if (SwooleG.main_reactor) { SwooleG.main_reactor->singal_no = signo; } else { swSignal_callback(signo); } }
static void swReactor_onFinish(swReactor *reactor) { //client exit if (SwooleG.serv == NULL && reactor->event_num == 0) { SwooleG.running = 0; } //check signal if (reactor->singal_no) { swSignal_callback(reactor->singal_no); reactor->singal_no = 0; } swReactor_onTimeout_and_Finish(reactor); }
static void swSignal_async_handler(int signo) { if (SwooleG.main_reactor) { SwooleG.main_reactor->singal_no = signo; } else { //discard signal if (_lock) { return; } _lock = 1; swSignal_callback(signo); _lock = 0; } }