misc signal fixes

This commit is contained in:
Jacob Lorentzon
2026-01-22 15:35:04 +01:00
committed by Jeremy Soller
parent 576fd5fe01
commit eeba32b3a2
6 changed files with 56 additions and 10 deletions
+8 -2
View File
@@ -223,13 +223,19 @@ impl PalSignal for Sys {
set: Option<&sigset_t>,
oset: Option<&mut sigset_t>,
) -> Result<(), Errno> {
Ok(match how {
match how {
_ if set.is_none() => {
if let Some(oset) = oset {
*oset = redox_rt::signal::get_sigmask()?;
}
}
SIG_SETMASK => redox_rt::signal::set_sigmask(set.copied(), oset)?,
SIG_BLOCK => redox_rt::signal::or_sigmask(set.copied(), oset)?,
SIG_UNBLOCK => redox_rt::signal::andn_sigmask(set.copied(), oset)?,
_ => return Err(Errno(EINVAL)),
})
}
Ok(())
}
fn sigsuspend(mask: &sigset_t) -> Errno {