diff --git a/Command/ConsumeMessagesCommand.php b/Command/ConsumeMessagesCommand.php index 2011e007..28ffee1c 100644 --- a/Command/ConsumeMessagesCommand.php +++ b/Command/ConsumeMessagesCommand.php @@ -255,7 +255,7 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti public function getSubscribedSignals(): array { - return $this->signals ?? (\defined('SIGTERM') ? [\SIGTERM, \SIGINT] : []); + return $this->signals ?? (\extension_loaded('pcntl') ? [\SIGTERM, \SIGINT] : []); } public function handleSignal(int $signal, int|false $previousExitCode = 0): int|false diff --git a/Command/FailedMessagesRetryCommand.php b/Command/FailedMessagesRetryCommand.php index ae47d774..53e70bb9 100644 --- a/Command/FailedMessagesRetryCommand.php +++ b/Command/FailedMessagesRetryCommand.php @@ -134,7 +134,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int public function getSubscribedSignals(): array { - return $this->signals ?? (\defined('SIGTERM') ? [\SIGTERM, \SIGINT] : []); + return $this->signals ?? (\extension_loaded('pcntl') ? [\SIGTERM, \SIGINT] : []); } public function handleSignal(int $signal, int|false $previousExitCode = 0): int|false