summaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-27 15:47:15 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-27 15:47:15 +0000
commit8f66132dd8c7c3c97b58741707e63c701ebfc340 (patch)
tree6d2e661f5fe52ae34a435f5ce00a70f6c0c673b7 /linux-user
parenta63c8bc6e7ef32a1a610643e8e08e9c34e9ff31b (diff)
downloadqemu-8f66132dd8c7c3c97b58741707e63c701ebfc340.tar.gz
qemu-8f66132dd8c7c3c97b58741707e63c701ebfc340.tar.bz2
qemu-8f66132dd8c7c3c97b58741707e63c701ebfc340.zip
linux-user: Add support for STOP/CONT signals.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5802 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/signal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 0a8d7aa041..e0f6aaf733 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -361,10 +361,15 @@ int queue_signal(CPUState *env, int sig, target_siginfo_t *info)
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 */