fix: relay Signals reset to plugins #13510
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will close #13501
Description
This PR expands on the relay of signals to running plugin processes. The Ctrlc relay has been generalized to SignalAction::Interrupt and when reset_signal is called on the main EngineState, a SignalAction::Reset is now relayed to running plugins.
User-Facing Changes
The signal handler closure now takes a
signals::SignalAction
, while previously it took no arguments. The handler will now be called on both interrupt and reset. The method to register a handler on the plugin side is now calledregister_signal_handler
instead ofregister_ctrlc_handler
example. This will only affect plugin authors who have started making use of #13181, which isn't currently part of an official release.The change will also require all of user's plugins to be recompiled in order that they don't error when a signal is received on the PluginInterface.
Testing