$this->onShutdown(Coroutine::waitSignal(SIGTERM | SIGINT))); } else { \pcntl_signal(SIGTERM, [$this, 'onStop']); \pcntl_signal(SIGINT, [$this, 'onStop']); } return $this; } }