Skip to content

Commit 765eceb

Browse files
committed
Double check if pcntl function exists
1 parent a26387b commit 765eceb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Messenger/EventListener/DispatchPcntlSignalListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ class DispatchPcntlSignalListener implements EventSubscriberInterface
2121
{
2222
public function onWorkerRunning(): void
2323
{
24+
if (!\function_exists('pcntl_signal_dispatch')) {
25+
return;
26+
}
27+
2428
pcntl_signal_dispatch();
2529
}
2630

0 commit comments

Comments
 (0)