45 if(function_exists(
'sapi_windows_set_ctrl_handler')){
46 sapi_windows_set_ctrl_handler($this->interruptCallback =
function(
int $signo) use ($interruptCallback) :
void{
47 if($signo === PHP_WINDOWS_EVENT_CTRL_C || $signo === PHP_WINDOWS_EVENT_CTRL_BREAK){
51 }elseif(function_exists(
'pcntl_signal')){
57 pcntl_signal($signal, $this->interruptCallback = fn(
int $signo) => $interruptCallback());
59 pcntl_async_signals(
true);