private function processRogueDaemons($grace_period, $warn, $force_stop) { $console = PhutilConsole::getConsole(); $rogue_daemons = PhutilDaemonOverseer::findRunningDaemons(); if ($rogue_daemons) { if ($force_stop) { $rogue_pids = ipull($rogue_daemons, 'pid'); $survivors = $this->sendStopSignals($rogue_pids, $grace_period); if ($survivors) { $console->writeErr("%s\n", pht('Unable to stop processes running without PID files. ' . 'Try running this command again with sudo.')); } } else { if ($warn) { $console->writeErr("%s\n", $this->getForceStopHint($rogue_daemons)); } } } return $rogue_daemons; }
private function processRogueDaemons($grace_period, $warn, $force_stop) { $console = PhutilConsole::getConsole(); $rogue_daemons = PhutilDaemonOverseer::findRunningDaemons(); if ($rogue_daemons) { if ($force_stop) { $stop_rogue_daemons = $this->buildRogueDaemons($rogue_daemons); $survivors = $this->sendStopSignals($stop_rogue_daemons, $grace_period, $force_stop); if ($survivors) { $console->writeErr(pht('Unable to stop processes running without pid files. Try running ' . 'this command again with sudo.' . "\n")); } } else { if ($warn) { $console->writeErr($this->getForceStopHint($rogue_daemons) . "\n"); } } } return $rogue_daemons; }