kernel: Avoid processing unregistered signals for init
This commit is contained in:
parent
15d6aae701
commit
bdcb690a7a
@ -117,6 +117,12 @@ void Thread::process_pending_signals(Registers* current_regs)
|
|||||||
if (handler.sa_handler == SIG_DFL)
|
if (handler.sa_handler == SIG_DFL)
|
||||||
{
|
{
|
||||||
default_signal:
|
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)");
|
kinfoln("signal: using default behavior (handler=SIG_DFL) (terminating)");
|
||||||
// FIXME: Add different default handlers for different signals and add signal exit codes.
|
// FIXME: Add different default handlers for different signals and add signal exit codes.
|
||||||
exit_and_signal_parent(255);
|
exit_and_signal_parent(255);
|
||||||
|
Loading…
Reference in New Issue
Block a user