Changeset View
Changeset View
Standalone View
Standalone View
src/future/exec/PhutilSignalRouter.php
Show All 12 Lines | public static function initialize() { | ||||
if (!self::$router) { | if (!self::$router) { | ||||
$router = new self(); | $router = new self(); | ||||
// If pcntl_signal() does not exist (particularly, on Windows), just | // If pcntl_signal() does not exist (particularly, on Windows), just | ||||
// don't install signal handlers. | // don't install signal handlers. | ||||
if (function_exists('pcntl_signal')) { | if (function_exists('pcntl_signal')) { | ||||
pcntl_signal(SIGHUP, array($router, 'routeSignal')); | pcntl_signal(SIGHUP, array($router, 'routeSignal')); | ||||
pcntl_signal(SIGTERM, array($router, 'routeSignal')); | pcntl_signal(SIGTERM, array($router, 'routeSignal')); | ||||
pcntl_signal(SIGWINCH, array($router, 'routeSignal')); | |||||
} | } | ||||
self::$router = $router; | self::$router = $router; | ||||
} | } | ||||
return self::getRouter(); | return self::getRouter(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |