1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 00:38:51 +02:00

When available, use async_signals in Phabricator

Summary: Ref T9640. See D17200 for the analogous change in libphutil.

Test Plan: See D17200.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9640

Differential Revision: https://secure.phabricator.com/D17201
This commit is contained in:
epriestley 2017-01-12 15:50:04 -08:00
parent 7ccc4cea43
commit e4f49f0806
2 changed files with 10 additions and 2 deletions

View file

@ -5,7 +5,11 @@
// script, except it loads the Phabricator environment and adds some Phabricator
// specific flags.
declare(ticks = 1);
if (function_exists('pcntl_async_signals')) {
pcntl_async_signals(true);
} else {
declare(ticks = 1);
}
$root = dirname(dirname(dirname(__FILE__)));
require_once $root.'/scripts/__init_script__.php';

View file

@ -7,7 +7,11 @@
// In some cases, Subversion sends us SIGTERM. If we don't catch the signal and
// react to it, we won't run object destructors by default and thus won't clean
// up temporary files. Declare ticks so we can install a signal handler.
declare(ticks=1);
if (function_exists('pcntl_async_signals')) {
pcntl_async_signals(true);
} else {
declare(ticks = 1);
}
$root = dirname(dirname(dirname(__FILE__)));
require_once $root.'/scripts/__init_script__.php';