mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
Fix Windows missing SIGINT bug
This commit is contained in:
parent
92483cf188
commit
348decf72f
@ -148,10 +148,13 @@ class CraftCommand extends BaseCommand
|
||||
|
||||
if (PHP_OS_FAMILY === 'Windows') {
|
||||
sapi_windows_set_ctrl_handler(function () use ($process) {
|
||||
$process->signal(SIGINT);
|
||||
if ($process->isRunning()) {
|
||||
$process->signal(-1073741510);
|
||||
}
|
||||
});
|
||||
} elseif (extension_loaded('pcntl')) {
|
||||
pcntl_signal(SIGINT, function () use ($process) {
|
||||
/* @noinspection PhpComposerExtensionStubsInspection */
|
||||
$process->signal(SIGINT);
|
||||
});
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user