Support signal mechanism for ch8(only works on signal-thread apps)

This commit is contained in:
Yifan Wu 2022-01-23 13:14:56 -08:00
parent 59f13cb536
commit 26bc01f3bc
17 changed files with 235 additions and 17 deletions

View file

@ -1,4 +1,4 @@
use super::exit;
use super::{getpid, kill, SignalFlags};
#[panic_handler]
fn panic_handler(panic_info: &core::panic::PanicInfo) -> ! {
@ -13,5 +13,6 @@ fn panic_handler(panic_info: &core::panic::PanicInfo) -> ! {
} else {
println!("Panicked: {}", err);
}
exit(-1);
kill(getpid() as usize, SignalFlags::SIGABRT.bits());
unreachable!()
}