diff mbox

[3/6] linux-user/signal.c: Don't pass sigaction uninitialised sa_flags

Message ID 3a5d30bf272c8db8e16e1e7ad5b8953f08df3e82.1392805802.git.riku.voipio@linaro.org
State Accepted
Commit 3a5d30bf272c8db8e16e1e7ad5b8953f08df3e82
Headers show

Commit Message

Riku Voipio Feb. 19, 2014, 10:35 a.m. UTC
From: Peter Maydell <peter.maydell@linaro.org>

When forcing a fatal signal, we weren't initialising the sa_flags
field in the struct sigaction we used to reset the signal handler
to SIG_DFL.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 linux-user/signal.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/linux-user/signal.c b/linux-user/signal.c
index 82e8592..04638e2 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -420,6 +420,7 @@  static void QEMU_NORETURN force_sig(int target_sig)
      * it to arrive. */
     sigfillset(&act.sa_mask);
     act.sa_handler = SIG_DFL;
+    act.sa_flags = 0;
     sigaction(host_sig, &act, NULL);
 
     /* For some reason raise(host_sig) doesn't send the signal when