Skip to content
Permalink
Browse files

Check for posix existence before using threads

Fixes #2335
  • Loading branch information
muglug committed Jan 2, 2020
1 parent 5f5a942 commit 9d8706dbad09ea3841873f6c0b0f6d8958f6a489
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Psalm/Internal/Fork/Pool.php
@@ -106,9 +106,9 @@ public function __construct(
'The pool size must be >= 2 to use the fork pool.'
);

if (!extension_loaded('pcntl')) {
if (!extension_loaded('pcntl') || !extension_loaded('posix')) {
echo
'The pcntl extension must be loaded in order for Psalm to be able to use multiple processes.'
'The pcntl & posix extensions must be loaded in order for Psalm to be able to use multiple processes.'
. PHP_EOL;
exit(1);
}

0 comments on commit 9d8706d

Please sign in to comment.
You can’t perform that action at this time.