Fix bug causing raise() to not deliver any signals.

This commit is contained in:
4lDO2
2024-06-26 22:26:19 +02:00
parent 13720f59d5
commit 93a3401df4
4 changed files with 6 additions and 6 deletions
+4 -3
View File
@@ -6,8 +6,7 @@ use rmm::Arch;
use spin::RwLock;
use crate::context::{
memory::{AddrSpace, PageSpan, Grant},
ContextId, WaitpidKey,
memory::{AddrSpace, Grant, PageSpan}, switch::SwitchResult, ContextId, WaitpidKey
};
use crate::{
@@ -251,7 +250,9 @@ pub fn kill(pid: ContextId, sig: usize) -> Result<usize> {
Err(Error::new(EPERM))
} else {
// Switch to ensure delivery to self
context::switch();
if let SwitchResult::Switched { signal: true } = context::switch() {
context::signal::signal_handler();
}
Ok(0)
}