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:
		| @@ -5,7 +5,11 @@ | |||||||
| // script, except it loads the Phabricator environment and adds some Phabricator | // script, except it loads the Phabricator environment and adds some Phabricator | ||||||
| // specific flags. | // specific flags. | ||||||
|  |  | ||||||
| declare(ticks = 1); | if (function_exists('pcntl_async_signals')) { | ||||||
|  |   pcntl_async_signals(true); | ||||||
|  | } else { | ||||||
|  |   declare(ticks = 1); | ||||||
|  | } | ||||||
|  |  | ||||||
| $root = dirname(dirname(dirname(__FILE__))); | $root = dirname(dirname(dirname(__FILE__))); | ||||||
| require_once $root.'/scripts/__init_script__.php'; | require_once $root.'/scripts/__init_script__.php'; | ||||||
|   | |||||||
| @@ -7,7 +7,11 @@ | |||||||
| // In some cases, Subversion sends us SIGTERM. If we don't catch the signal and | // 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 | // 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. | // 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__))); | $root = dirname(dirname(dirname(__FILE__))); | ||||||
| require_once $root.'/scripts/__init_script__.php'; | require_once $root.'/scripts/__init_script__.php'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 epriestley
					epriestley