crash-handling icon indicating copy to clipboard operation
crash-handling copied to clipboard

Support custom signal masks in crash_handler

Open sfackler opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. I'd like to enable on-demand minidumps of a server I'm working on in response to a nonfatal signal (e.g. SIGQUIT like the JVM or maybe a SIGUSR1). However, these signals are not handled by crash-handler.

Describe the solution you'd like It'd be great if you could optionally provide the set of signals you'd like the crash-handler to handle.

sfackler avatar Apr 17 '23 01:04 sfackler

I'm wondering if the cleanest way of accomplishing this is to either have a code example of using eg. signal_hook or some other similar crate, or actually have a feature to pull in such a crate with a simple API to call simulate_signal when one of them is raised. Basically I kind of want to avoid having user configurability for the signals since right now there are no heap allocations in the internals, and pessimistically having storage enough for all possible signals that can be caught feels quite wrong.

Jake-Shadle avatar Jan 29 '24 13:01 Jake-Shadle

Yeah, that'd definitely work too.

sfackler avatar Jan 29 '24 14:01 sfackler

Cool, sorry for the slow response on this, I think whatever implementation that would close this issue would probably be done along with #78 as both of them are fundamentally the same thing, ie, invoke the crash handling code due to something other than an actual crash.

Jake-Shadle avatar Jan 29 '24 14:01 Jake-Shadle