summaryrefslogtreecommitdiff
path: root/packages/qemu/qemu-0.9.0+cvs20071121/11_signal_sigaction.patch
blob: 33c5e8b12d56702149d800e5b18010452d418358 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#DPATCHLEVEL=0
---
# linux-user/signal.c |    5 +++++
# 1 file changed, 5 insertions(+)
#
Index: linux-user/signal.c
===================================================================
--- linux-user/signal.c.orig	2007-12-03 23:47:44.000000000 +0000
+++ linux-user/signal.c	2007-12-03 23:47:46.000000000 +0000
@@ -512,6 +512,11 @@ int do_sigaction(int sig, const struct t
 
     if (sig < 1 || sig > TARGET_NSIG || sig == SIGKILL || sig == SIGSTOP)
         return -EINVAL;
+
+    /* no point doing the stuff as those are not allowed for sigaction */
+    if ((sig == TARGET_SIGKILL) || (sig == TARGET_SIGSTOP))
+        return -EINVAL;
+
     k = &sigact_table[sig - 1];
 #if defined(DEBUG_SIGNAL)
     fprintf(stderr, "sigaction sig=%d act=0x%08x, oact=0x%08x\n",