do not handle signal on debug

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-04-06 12:02:01 +08:00
parent 53f6734997
commit a65611da48

View File

@ -65,6 +65,7 @@ pub fn register_breakdown_handler<T>(callback: T)
where
T: Fn() + 'static,
{
#[cfg(not(debug_assertions))]
unsafe {
GLOBAL_CALLBACK = Some(Box::new(callback));
libc::signal(libc::SIGSEGV, breakdown_signal_handler as _);