mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix signal dispatch if sigreturn is NULL.
This commit is contained in:
parent
ab228e1062
commit
969a3e599b
1 changed files with 3 additions and 4 deletions
|
@ -549,8 +549,6 @@ void Thread::HandleSignal(struct interrupt_context* intctx)
|
|||
|
||||
ScopedLock lock(&process->signal_lock);
|
||||
|
||||
assert(process->sigreturn);
|
||||
|
||||
retry_another_signal:
|
||||
|
||||
// Determine which signals are not blocked.
|
||||
|
@ -613,8 +611,9 @@ retry_another_signal:
|
|||
assert(action->sa_handler != SIG_DFL || !sigismember(&default_ignored_signals, signum));
|
||||
|
||||
// The default action must be to terminate the process. Signals that are
|
||||
// ignored by default got discarded earlier.
|
||||
if ( action->sa_handler == SIG_DFL )
|
||||
// ignored by default got discarded earlier. If execve() failed, sigreturn
|
||||
// may be NULL and the process isn't able to properly process signals.
|
||||
if ( action->sa_handler == SIG_DFL || !process->sigreturn )
|
||||
{
|
||||
kthread_mutex_unlock(&process->signal_lock);
|
||||
process->ExitThroughSignal(signum);
|
||||
|
|
Loading…
Reference in a new issue