Added signal handler
This commit is contained in:
parent
c0f4382cc9
commit
ca094df37e
@ -235,6 +235,18 @@ class Asynchronous
|
||||
self::removedShmBlock();
|
||||
});
|
||||
|
||||
/*
|
||||
* The signal handler
|
||||
*/
|
||||
foreach([SIGINT, SIGTERM, SIGUSR1] as $signal)
|
||||
pcntl_signal($signal, function($s) use (&$instance) {
|
||||
if ($instance->isChild)
|
||||
return;
|
||||
self::killChildren();
|
||||
self::awaitChildren();
|
||||
self::removedShmBlock();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user