Skip to content

Commit

Permalink
[watchmedo] Add SIGHUP termination signals (#912)
Browse files Browse the repository at this point in the history
* add SIGHUP handler to watchmedo

* changelog
  • Loading branch information
babymastodon committed Aug 13, 2022
1 parent e8c20a4 commit 21e9f4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion changelog.rst
Expand Up @@ -10,7 +10,8 @@ Changelog

- [documentation] HTML documentation builds are now tested for errors.
- [fsevents2] The fsevents2 observer is now deprecated.
- Thanks to our beloved contributors: @kurtmckee
- [watchmedo] Handle shutdown events from ``SIGHUP`` (`#912 <https://github.com/gorakhargosh/watchdog/pull/912>`__)
- Thanks to our beloved contributors: @kurtmckee @babymastodon

2.1.9
~~~~~
Expand Down
2 changes: 1 addition & 1 deletion src/watchdog/watchmedo.py
Expand Up @@ -610,7 +610,7 @@ def auto_restart(args):

# Handle termination signals by raising a semantic exception which will
# allow us to gracefully unwind and stop the observer
termination_signals = {signal.SIGTERM, signal.SIGINT}
termination_signals = {signal.SIGTERM, signal.SIGINT, signal.SIGHUP}

def handler_termination_signal(_signum, _frame):
# Neuter all signals so that we don't attempt a double shutdown
Expand Down

0 comments on commit 21e9f4c

Please sign in to comment.