From 01b2a6bbe10a9815986589bf6f1f76127e816fff Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 27 Mar 2011 00:23:39 -0700 Subject: [PATCH] Show and reap dead daemons from phd. --- .../daemon/control/PhabricatorDaemonControl.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/daemon/control/PhabricatorDaemonControl.php b/src/infrastructure/daemon/control/PhabricatorDaemonControl.php index 2e82cc1c12..ce72b27b26 100644 --- a/src/infrastructure/daemon/control/PhabricatorDaemonControl.php +++ b/src/infrastructure/daemon/control/PhabricatorDaemonControl.php @@ -50,13 +50,20 @@ final class PhabricatorDaemonControl { "Started", "Daemon"); foreach ($daemons as $daemon) { + $name = $daemon->getName(); + if (!$daemon->isRunning()) { + $name = ' '.$name; + if ($daemon->getPIDFile()) { + Filesystem::remove($daemon->getPIDFile()); + } + } printf( "%5s\t%-24s\t%s\n", $daemon->getPID(), $daemon->getEpochStarted() ? date('M j Y, g:i:s A', $daemon->getEpochStarted()) : null, - $daemon->getName()); + $name); } return 0;