Sending a SIGTERM signal to weewxd now causes it to exit with status

128 + signal#. PR #442. Thanks to user sshambar!
This commit is contained in:
tkeffer@gmail.com
2019-09-08 11:43:48 -06:00
2 changed files with 5 additions and 2 deletions

View File

@@ -949,8 +949,8 @@ def main(options, args, engine_class=StdEngine):
except Terminate:
log.info("Terminating weewx version %s", weewx.__version__)
weeutil.logger.log_traceback(log.info, " **** ")
# Reraise the exception (this should cause the program to exit)
raise
signal.signal(signal.SIGTERM, signal.SIG_DFL)
os.kill(0, signal.SIGTERM)
# Catch any keyboard interrupts and log them
except KeyboardInterrupt:

View File

@@ -134,6 +134,9 @@ Fixes issue #431. Thanks to user ls4096!
Fixed problem that can cause an exception with restx services that do not use
the database manager. See commit 459ccb1.
Sending a SIGTERM signal to weewxd now causes it to exit with status
128 + signal#. PR #442. Thanks to user sshambar!
3.9.1 02/06/2019