Skip to content

Commit d3558eb

Browse files
author
epriestley
committed
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
1 parent 46b85ab commit d3558eb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/daemon/phabricator_daemon_launcher.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@
2424
phutil_require_module('phabricator', 'infrastructure/daemon/control');
2525
$control = new PhabricatorDaemonControl();
2626

27+
must_have_extension('pcntl');
28+
must_have_extension('posix');
29+
30+
function must_have_extension($ext) {
31+
if (!extension_loaded($ext)) {
32+
echo "ERROR: The PHP extension '{$ext}' is not installed. You must ".
33+
"install it to run daemons on this machine.\n";
34+
exit(1);
35+
}
36+
}
37+
2738
switch (isset($argv[1]) ? $argv[1] : 'help') {
2839
case 'list':
2940
$err = $control->executeListCommand();

0 commit comments

Comments
 (0)