Fix exits which may cause double-free corruption (#1086)
This commit is contained in:
parent
20958a979f
commit
b7296db406
@ -87,7 +87,7 @@ pub unsafe fn shutdown_handler<SP>(
|
||||
std::ptr::drop_in_place(sr);
|
||||
}
|
||||
log::info!("Bye!");
|
||||
std::process::exit(0);
|
||||
libc::_exit(0);
|
||||
}
|
||||
|
||||
#[cfg(all(unix, feature = "std"))]
|
||||
|
@ -1536,7 +1536,7 @@ where
|
||||
.post_exec_child_all(state, input, &ExitKind::Ok)
|
||||
.expect("Failed to run post_exec on observers");
|
||||
|
||||
std::process::exit(0);
|
||||
libc::_exit(0);
|
||||
|
||||
Ok(ExitKind::Ok)
|
||||
}
|
||||
@ -1613,7 +1613,7 @@ where
|
||||
.post_exec_child_all(state, input, &ExitKind::Ok)
|
||||
.expect("Failed to run post_exec on observers");
|
||||
|
||||
std::process::exit(0);
|
||||
libc::_exit(0);
|
||||
|
||||
Ok(ExitKind::Ok)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user