From ab2b83ce145c109cf052e1d0d4618e8a4e3df153 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 15 Mar 2011 20:55:05 -0700 Subject: [PATCH] Fix chdir() + proc_open() php 5.2 issues. --- .../daemon/control/PhabricatorDaemonControl.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/infrastructure/daemon/control/PhabricatorDaemonControl.php b/src/infrastructure/daemon/control/PhabricatorDaemonControl.php index 550b16acec..2e82cc1c12 100644 --- a/src/infrastructure/daemon/control/PhabricatorDaemonControl.php +++ b/src/infrastructure/daemon/control/PhabricatorDaemonControl.php @@ -177,10 +177,7 @@ EOHELP $argv[$key] = escapeshellarg($arg); } - // Side effect. :/ We're playing games here to keep 'ps' looking reasonable. - chdir($launch_daemon); - - execx( + $future = new ExecFuture( "./launch_daemon.php ". "%s ". "--load-phutil-library=%s ". @@ -192,6 +189,11 @@ EOHELP phutil_get_library_root('phabricator'), PhabricatorEnv::getURI('/api/'), $pid_dir); + + // Play games to keep 'ps' looking reasonable. + $future->setCWD($launch_daemon); + + $future->resolvex(); } protected function getControlDirectory($dir) {