Skip to content

Commit

Permalink
PCNTL no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Apr 14, 2022
1 parent 790678c commit 43dd811
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion build/composer-require-checker.json
Expand Up @@ -19,7 +19,6 @@
"Reflection",
"SPL",
"standard",
"pcntl",
"mbstring",
"hash",
"tokenizer",
Expand Down
16 changes: 0 additions & 16 deletions src/Command/CommandHelper.php
Expand Up @@ -51,8 +51,6 @@
use function is_readable;
use function is_string;
use function mkdir;
use function pcntl_async_signals;
use function pcntl_signal;
use function register_shutdown_function;
use function sprintf;
use function str_ends_with;
Expand Down Expand Up @@ -354,7 +352,6 @@ public static function begin(
throw new InceptionNotSuccessfulException();
}

self::setUpSignalHandler($errorOutput);
/** @var bool|null $customRulesetUsed */
$customRulesetUsed = $container->getParameter('customRulesetUsed');
if ($customRulesetUsed === null) {
Expand Down Expand Up @@ -498,19 +495,6 @@ private static function executeBootstrapFile(
}
}

private static function setUpSignalHandler(Output $output): void
{
if (!function_exists('pcntl_signal')) {
return;
}

pcntl_async_signals(true);
pcntl_signal(SIGINT, static function () use ($output): void {
$output->writeLineFormatted('');
exit(1);
});
}

/**
* @param string[] $configFiles
* @param array<string, string> $loaderParameters
Expand Down

0 comments on commit 43dd811

Please sign in to comment.