Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SIGHUP termination signal to watchmedo #912

Merged
merged 2 commits into from Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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