Function libafl::bolts::os::unix_signals::setup_signal_handler [−][src]
pub unsafe fn setup_signal_handler<T: 'static + Handler>(
handler: &mut T
) -> Result<(), Error>
Setup signal handlers in a somewhat rusty way.
This will allocate a signal stack and set the signal handlers accordingly.
It is, for example, used in the crate::executors::InProcessExecutor
to restart the fuzzer in case of a crash,
or to handle SIGINT
in the broker process.
Safety
The signal handlers will be called on any signal. They should (tm) be async safe. A lot can go south in signal handling. Be sure you know what you are doing.