mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Explicitly detect missing pcntl and exit with an obvious error
Summary: We already detect this in setup but double-check just in case, see gmail thread. Test Plan: Rebuilt PHP without pcntl and tried to run phd, got an error. Reviewed By: aran Reviewers: aran, jungejason, tuomaspelkonen CC: aran Differential Revision: 819
This commit is contained in:
parent
46b85ab212
commit
d3558eb25f
1 changed files with 11 additions and 0 deletions
|
@ -24,6 +24,17 @@ require_once $root.'/scripts/__init_env__.php';
|
|||
phutil_require_module('phabricator', 'infrastructure/daemon/control');
|
||||
$control = new PhabricatorDaemonControl();
|
||||
|
||||
must_have_extension('pcntl');
|
||||
must_have_extension('posix');
|
||||
|
||||
function must_have_extension($ext) {
|
||||
if (!extension_loaded($ext)) {
|
||||
echo "ERROR: The PHP extension '{$ext}' is not installed. You must ".
|
||||
"install it to run daemons on this machine.\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
switch (isset($argv[1]) ? $argv[1] : 'help') {
|
||||
case 'list':
|
||||
$err = $control->executeListCommand();
|
||||
|
|
Loading…
Reference in a new issue