mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't traceback if the process is no longer running.
This commit is contained in:
parent
e1e1aeb3d7
commit
177d9c4ead
1 changed files with 6 additions and 1 deletions
|
@ -14,6 +14,7 @@ import copy
|
|||
import json
|
||||
import time
|
||||
import stat
|
||||
import errno
|
||||
import signal
|
||||
import shutil
|
||||
import pprint
|
||||
|
@ -401,7 +402,11 @@ class SaltDaemonScriptBase(SaltScriptBase):
|
|||
time.sleep(0.125)
|
||||
except (SystemExit, KeyboardInterrupt):
|
||||
# Let's close the terminal now that we're done with it
|
||||
terminal.send_signal(signal.SIGTERM)
|
||||
try:
|
||||
terminal.send_signal(signal.SIGTERM)
|
||||
except OSError as exc:
|
||||
if exc.errno != errno.ESRCH:
|
||||
raise
|
||||
terminal.communicate()
|
||||
self.exitcode = terminal.returncode
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue