浏览代码

Let sys$sigaction() fail if called with SIGKILL or SIGSTOP.

Andreas Kling 6 年之前
父节点
当前提交
6a9fa3e41a
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Kernel/Process.cpp

+ 1 - 2
Kernel/Process.cpp

@@ -1737,8 +1737,7 @@ int Process::sys$sigpending(Unix::sigset_t* set)
 
 int Process::sys$sigaction(int signum, const Unix::sigaction* act, Unix::sigaction* old_act)
 {
-    // FIXME: Fail with -EINVAL if attepmting to change action for SIGKILL or SIGSTOP.
-    if (signum < 1 || signum >= 32)
+    if (signum < 1 || signum >= 32 || signum == SIGKILL || signum == SIGSTOP)
         return -EINVAL;
     if (!validate_read_typed(act))
         return -EFAULT;