Fix the signal action examination of SIGKILL and SIGSTOP

Sigaction() can be called with a NULL second argument to query the
current signal handler.
This commit is contained in:
He Sun 2020-07-24 09:45:08 +08:00 committed by tate.thl
parent 572873d9a4
commit 2400cc4baa

@ -8,7 +8,7 @@ pub fn do_rt_sigaction(signum: SigNum, new_sa: Option<SigAction>) -> Result<SigA
&signum, &new_sa
);
if signum == SIGKILL || signum == SIGSTOP {
if (signum == SIGKILL || signum == SIGSTOP) && new_sa.is_some() {
return_errno!(
EINVAL,
"The actions for SIGKILL or SIGSTOP cannot be changed"