Daemons - handle daemons that can't be killed a bit better
Summary:
Ref T2374. Fixes T5988.
Keep track of what's been killed and not been killed, and surface that maybe you need sudo if things don't get killed with --force
...also basically make this force thing work. I managed to convinced myself stuff was getting killed with --force when it mostly wasn't. Make sure the --force parameter gets pushed as low as it needs to go to have things get killed.
Test Plan:
- sudo ./bin/phd restart
- rm -rf /var/tmp/phd/pid/*
- ./bin/phd stop --> get warning about rogue daemons
- ./bin/phd stop X --> get warning about no running daemons
- ./bin/phd stop --force --> get warning about not being able to kill daemons
- sudo ./bin/phd stop --force --> kill daemons successfully
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: epriestley, Korvin
Maniphest Tasks: T2374, T5988
Differential Revision: https://secure.phabricator.com/D10386