From: Erik van der Kouwe Date: Sun, 13 Sep 2009 12:24:23 +0000 (+0000) Subject: Handle SIGSTOP more consistently and according to POSIX rules; it can no longer be... X-Git-Tag: v3.1.5~148 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=3615d93383a33eab3ae01ee99ca00465c2e002f7;p=minix.git Handle SIGSTOP more consistently and according to POSIX rules; it can no longer be ignored --- diff --git a/man/man2/sigaction.2 b/man/man2/sigaction.2 index c35044b34..9c1fa71fd 100644 --- a/man/man2/sigaction.2 +++ b/man/man2/sigaction.2 @@ -182,7 +182,9 @@ The process should be stopped, but is killed instead. .PP The .B SIGKILL -signal cannot be caught or ignored. The +and +.B SIGSTOP +signals cannot be caught or ignored. The .B SIGILL and .B SIGTRAP diff --git a/servers/pm/signal.c b/servers/pm/signal.c index aec9a670c..ca1c73f6a 100644 --- a/servers/pm/signal.c +++ b/servers/pm/signal.c @@ -82,6 +82,7 @@ PUBLIC int do_sigaction() } mp->mp_sigact[m_in.sig_nr].sa_handler = svec.sa_handler; sigdelset(&svec.sa_mask, SIGKILL); + sigdelset(&svec.sa_mask, SIGSTOP); mp->mp_sigact[m_in.sig_nr].sa_mask = svec.sa_mask; mp->mp_sigact[m_in.sig_nr].sa_flags = svec.sa_flags; mp->mp_sigreturn = (vir_bytes) m_in.sig_ret; @@ -160,6 +161,7 @@ PUBLIC int do_sigsuspend() mp->mp_sigmask2 = mp->mp_sigmask; /* save the old mask */ mp->mp_sigmask = (sigset_t) m_in.sig_set; sigdelset(&mp->mp_sigmask, SIGKILL); + sigdelset(&mp->mp_sigmask, SIGSTOP); mp->mp_flags |= SIGSUSPENDED; check_pending(mp); return(SUSPEND); @@ -178,6 +180,7 @@ PUBLIC int do_sigreturn() mp->mp_sigmask = (sigset_t) m_in.sig_set; sigdelset(&mp->mp_sigmask, SIGKILL); + sigdelset(&mp->mp_sigmask, SIGSTOP); r = sys_sigreturn(who_e, (struct sigmsg *) m_in.sig_context); check_pending(mp);