-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a separate `_shutdown` method called by `run` and by signal handlers. It's responsible for removing the PID file and for setting `continue` to `0`. This should ensure that it's always called at least once, and is safe to call multiple times. Either way the PID file should now always be deleted and the shutdown activity properly logged. Also set all the signal handlers in the `_signal_handlers` method, and teach it to nest signal handlers if necessary. This will keep the consumer from wiping out its own handlers. I have no reason to think they have been, but it seems best to play it as safe as possible. Add a slew of new tests to test all these behaviors thoroughly.
- Loading branch information
Showing
3 changed files
with
159 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters