protected function handleSignals(): void
    {
        foreach ([SIGTERM, SIGQUIT, SIGABRT, SIGINT] as $signal) {
            pcntl_signal($signal, function ($signal) {
                $this->terminate($signal);
            });
        }
    }