Skip to content

Commit 4ec0429

Browse files
s0undt3chMegan Wilhite
authored and
Megan Wilhite
committed
Call os._exit() instead of sys.exit() on forked processes.
This avoids some tracebacks while python is shutting down. Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
1 parent e47e47a commit 4ec0429

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

salt/utils/process.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,8 @@ def _handle_signals(self, signum, sigframe):
10901090
self.pid,
10911091
os.getpid(),
10921092
)
1093-
sys.exit(salt.defaults.exitcodes.EX_OK)
1093+
# It's OK to call os._exit instead of sys.exit on forked processed
1094+
os._exit(salt.defaults.exitcodes.EX_OK)
10941095

10951096
def start(self):
10961097
with default_signals(signal.SIGINT, signal.SIGTERM):

0 commit comments

Comments
 (0)