1
0
Fork 0

Add a default signal handler to avoid having the SIGINTs ignored, fixes #9027

pull/9035/head
Jordi Boggiano 2020-07-01 11:37:38 +02:00
parent ee4afa29e7
commit 1fa6f4c83c
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 7 additions and 0 deletions

View File

@ -81,6 +81,13 @@ class Application extends BaseApplication
}
if (!$shutdownRegistered) {
if (function_exists('pcntl_async_signals') && function_exists('pcntl_signal')) {
pcntl_async_signals(true);
pcntl_signal(SIGINT, function ($sig) {
exit(130);
});
}
$shutdownRegistered = true;
register_shutdown_function(function () {