mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Adjusted for review comments
This commit is contained in:
parent
2d20fbe6a5
commit
406d3829f4
@ -807,15 +807,17 @@ class SignalHandlingMultiprocessingProcess(MultiprocessingProcess):
|
||||
msg += '. Exiting'
|
||||
log.debug(msg)
|
||||
if HAS_PSUTIL:
|
||||
if psutil.pid_exists(self.pid):
|
||||
try:
|
||||
process = psutil.Process(self.pid)
|
||||
if hasattr(process, 'children'):
|
||||
for child in process.children(recursive=True):
|
||||
try:
|
||||
process = psutil.Process(self.pid)
|
||||
if hasattr(process, 'children'):
|
||||
for child in process.children(recursive=True):
|
||||
try:
|
||||
if child.is_running():
|
||||
child.terminate()
|
||||
except psutil.NoSuchProcess:
|
||||
pass
|
||||
except psutil.NoSuchProcess:
|
||||
pass
|
||||
except psutil.NoSuchProcess:
|
||||
pass
|
||||
sys.exit(salt.defaults.exitcodes.EX_OK)
|
||||
|
||||
def start(self):
|
||||
|
Loading…
Reference in New Issue
Block a user