aboutsummaryrefslogtreecommitdiff
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
commit60b196917f6e5cb58692b701a7e937ecc325dcfd (patch)
tree6d2e661f5fe52ae34a435f5ce00a70f6c0c673b7
parent2a913eb118dec726bd5f1dd1c94aa4ffb329afd7 (diff)
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
-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 */