You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#336 was a reminder on how good intentions can end up having undesirable impact which is why it should be put into question if the bundling with signal-hook is the right choice for a plumbing crate.
Despite the ecosystem being centered around signal-hook, it seems clear that other options are possible that shouldn't have to deal with an unnecessary dependency.
It also appears that more complex applications will want their own signal handlers and free reign on how to integrate the cleanup, for reference, git-repository also integrates the cleanup handler directly instead of calling setup().
Revisit the way the cleanup handler is promoted to users of the library to make it reasonably easy to use while avoiding accidental behaviour to emerge.
The text was updated successfully, but these errors were encountered:
…339)
This change also consolidates all signal handling into its own module called
`signal` to provide reusable handlers and as well as well as signal initialization.
Note that the functions to cleanup tempfiles don't interact with the signal registry,
hence they still can be called without the `signals` feature enabled.
Note that this change sneakily fixes a bug that could have caused a `write_all()`
on a tempfile that was removed by a signal to enter an infinite loop.
#336 was a reminder on how good intentions can end up having undesirable impact which is why it should be put into question if the bundling with
signal-hook
is the right choice for a plumbing crate.Despite the ecosystem being centered around
signal-hook
, it seems clear that other options are possible that shouldn't have to deal with an unnecessary dependency.It also appears that more complex applications will want their own signal handlers and free reign on how to integrate the cleanup, for reference,
git-repository
also integrates the cleanup handler directly instead of callingsetup()
.Revisit the way the cleanup handler is promoted to users of the library to make it reasonably easy to use while avoiding accidental behaviour to emerge.
The text was updated successfully, but these errors were encountered: