private setUpSignalHandler ( Symfony\Component\Console\Style\StyleInterface $consoleStyle, string $memoryLimitFile ) | ||
$consoleStyle | Symfony\Component\Console\Style\StyleInterface | |
$memoryLimitFile | string |
private function setUpSignalHandler(StyleInterface $consoleStyle, string $memoryLimitFile)
{
if (function_exists('pcntl_signal')) {
pcntl_signal(SIGINT, function () use($consoleStyle, $memoryLimitFile) {
if (file_exists($memoryLimitFile)) {
unlink($memoryLimitFile);
}
$consoleStyle->newLine();
exit(1);
});
}
}