1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-29 17:00:59 +01:00

Fix a minor issue with killing daemons

Summary: Even if you --force, we can't kill PID 0. This sends the process itself the signal, and terminates it.

Test Plan: See D11786.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11787
This commit is contained in:
epriestley 2015-02-17 14:20:57 -08:00
parent 17ced84ace
commit b6031a721f

View file

@ -508,7 +508,9 @@ abstract class PhabricatorDaemonManagementWorkflow
$pid = $daemon->getPID();
$name = $daemon->getName();
if (!$pid && !$force) {
if (!$pid) {
// NOTE: We must have a PID to signal a daemon, since sending a signal
// to PID 0 kills this process.
$console->writeOut("%s\n", pht("Daemon '%s' has no PID!", $name));
unset($daemons[$key]);
continue;