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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user