do not handle signal on debug
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
53f6734997
commit
a65611da48
@ -65,6 +65,7 @@ pub fn register_breakdown_handler<T>(callback: T)
|
|||||||
where
|
where
|
||||||
T: Fn() + 'static,
|
T: Fn() + 'static,
|
||||||
{
|
{
|
||||||
|
#[cfg(not(debug_assertions))]
|
||||||
unsafe {
|
unsafe {
|
||||||
GLOBAL_CALLBACK = Some(Box::new(callback));
|
GLOBAL_CALLBACK = Some(Box::new(callback));
|
||||||
libc::signal(libc::SIGSEGV, breakdown_signal_handler as _);
|
libc::signal(libc::SIGSEGV, breakdown_signal_handler as _);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user