Implement signals, finally! #30

Merged
apio merged 14 commits from finally-signals into main 2023-07-10 20:16:00 +00:00
Showing only changes of commit bdcb690a7a - Show all commits

View File

@ -117,6 +117,12 @@ void Thread::process_pending_signals(Registers* current_regs)
if (handler.sa_handler == SIG_DFL)
{
default_signal:
if (id == 1)
{
kwarnln("signal: init got a signal it has no handler for, ignoring");
return;
}
kinfoln("signal: using default behavior (handler=SIG_DFL) (terminating)");
// FIXME: Add different default handlers for different signals and add signal exit codes.
exit_and_signal_parent(255);