Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions src/supervisor/patch/0002-process-exit-logseverity.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
diff --git a/supervisor/process.py b/supervisor/process.py
index 5f73e6b..4caf450 100644
--- a/supervisor/process.py
+++ b/supervisor/process.py
@@ -539,6 +539,13 @@ class Subprocess:
msg = "stopped: %s (%s)" % (processname, msg)
self._assertInState(ProcessStates.STOPPING)
self.change_state(ProcessStates.STOPPED)
+ if exit_expected:
+ self.config.options.logger.info(msg)
+ else:
+ if "SIGTERM" in msg or "SIGKILL" in msg:
+ self.config.options.logger.warn(msg)
+ else:
+ self.config.options.logger.critical(msg)

elif too_quickly:
# the program did not stay up long enough to make it to RUNNING
@@ -548,6 +555,7 @@ class Subprocess:
msg = "exited: %s (%s)" % (processname, msg + "; not expected")
self._assertInState(ProcessStates.STARTING)
self.change_state(ProcessStates.BACKOFF)
+ self.config.options.logger.warn(msg)

else:
# this finish was not the result of a stop request, the
@@ -569,13 +577,17 @@ class Subprocess:
# expected exit code
msg = "exited: %s (%s)" % (processname, msg + "; expected")
self.change_state(ProcessStates.EXITED, expected=True)
+ self.config.options.logger.info(msg)
else:
# unexpected exit code
self.spawnerr = 'Bad exit code %s' % es
msg = "exited: %s (%s)" % (processname, msg + "; not expected")
self.change_state(ProcessStates.EXITED, expected=False)
+ if "SIGTERM" in msg or "SIGKILL" in msg:
+ self.config.options.logger.warn(msg)
+ else:
+ self.config.options.logger.critical(msg)

- self.config.options.logger.info(msg)

self.pid = 0
self.config.options.close_parent_pipes(self.pipes)
1 change: 1 addition & 0 deletions src/supervisor/patch/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# This series applies on GIT commit 34b690aea8cf7572d73765c95c54a83261d69aad
0001-Prevent-excessive-hanging-and-crashes-if-system-cloc.patch
0002-process-exit-logseverity.patch