-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement(config): Remove the watcher's coupling to SIGHUP / prepar…
…e for automatic Windows config reload (#20989) * Remove the watcher's dependency on SIGHUP / unix Right now the watcher is broken/unimplemented for Windows and a large part of the reason for that might be how it works: * the watcher subscribes to filesystem events (crate: notify) * the watcher raises a unix signal (SIGHUP) on detecting changes * the signal handler (again, unix only) reacts to SIGHUP with an internal reload signal * (vector magically reloads/compares the configs) With these changes that unix signal dependency is removed * the watcher clones a SignalTx to emit its very own signals * the watcher sends an internal reload signal on detecting changes * (vector magically reloads/compares the configs) All of this _should_ also work on Windows, has nothing to do with unix signals anymore. I slightly modified the tests to not just wait for any Ok, but to state explicitly what signal we expect to receive. Cargo fmt * Make clippy happy * Add changelog entry * Update changelog.d/support-config-watch-for-windows.enhancement.md * Fix newly merged test case --------- Co-authored-by: Jesse Szwedko <[email protected]> Co-authored-by: Jesse Szwedko <[email protected]>
- Loading branch information
1 parent
e90cece
commit c3cd232
Showing
3 changed files
with
45 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Windows now supports the -w command line parameter just like every other | ||
platform and will reload the configuration files on any change | ||
|
||
authors: darklajid |
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