mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 16:33:01 +08:00
Merge pull request #3944 from fufesou/refact/do_not_handle_signal_on_debug
do not handle signal on debug
This commit is contained in:
commit
112cd631fb
@ -61,12 +61,13 @@ extern "C" fn breakdown_signal_handler(sig: i32) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
pub fn register_breakdown_handler<T>(callback: T)
|
||||
pub fn register_breakdown_handler<T>(_callback: T)
|
||||
where
|
||||
T: Fn() + 'static,
|
||||
{
|
||||
#[cfg(not(debug_assertions))]
|
||||
unsafe {
|
||||
GLOBAL_CALLBACK = Some(Box::new(callback));
|
||||
GLOBAL_CALLBACK = Some(Box::new(_callback));
|
||||
libc::signal(libc::SIGSEGV, breakdown_signal_handler as _);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user