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:
parent
17ced84ace
commit
b6031a721f
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue