compositor: reset all signals during startup
This commit is contained in:
parent
456457eade
commit
fdfc20452f
3 changed files with 16 additions and 11 deletions
|
|
@ -50,3 +50,15 @@ async fn handle_signals(fd: Rc<OwnedFd>, ring: Rc<IoUring>) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reset_all() {
|
||||
const NSIG: c::c_int = 64;
|
||||
unsafe {
|
||||
for sig in 1..=NSIG {
|
||||
c::signal(sig, c::SIG_DFL);
|
||||
}
|
||||
}
|
||||
let mut set: c::sigset_t = uapi::pod_zeroed();
|
||||
uapi::sigfillset(&mut set).unwrap();
|
||||
let _ = uapi::pthread_sigmask(c::SIG_UNBLOCK, Some(&set), None);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue