Skip to contentSkip to conversation

[5802] linux-user: Add support for STOP/CONT signals.

Qemu-devel Thiemo Seufer 1 participant 1 message Nov 27, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5802

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5802
Author:   ths
Date:     2008-11-27 15:47:15 +0000 (Thu, 27 Nov 2008)

Log Message:
-----------
linux-user: Add support for STOP/CONT signals.

Modified Paths:
--------------
trunk/linux-user/signal.c

Modified: trunk/linux-user/signal.c
===================================================================

linux-user/signal.c +6 -1
@@ -361,10 +361,15 @@
     k = &ts->sigtab[sig - 1];
     handler = sigact_table[sig - 1]._sa_handler;
     if (handler == TARGET_SIG_DFL) {
+        if (sig == TARGET_SIGTSTP || sig == TARGET_SIGTTIN || sig == TARGET_SIGTTOU) {
+            kill(getpid(),SIGSTOP);
+            return 0;
+        } else
         /* default handler : ignore some signal. The other are fatal */
         if (sig != TARGET_SIGCHLD &&
             sig != TARGET_SIGURG &&
-            sig != TARGET_SIGWINCH) {
+            sig != TARGET_SIGWINCH &&
+            sig != TARGET_SIGCONT) {
             force_sig(sig);
         } else {
             return 0; /* indicate ignored */