[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] linux-user: Add support for STOP/CONT signals
From: |
Riku Voipio |
Subject: |
[Qemu-devel] [PATCH] linux-user: Add support for STOP/CONT signals |
Date: |
Sun, 23 Nov 2008 23:36:48 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060126 |
When running qemu-user, you might want to be able to STOP and
CONT the emulated process.
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/signal.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 1dd634f..cce4922 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 */
--
1.5.6.5
--
"rm -rf" only sounds scary if you don't have backups
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] linux-user: Add support for STOP/CONT signals,
Riku Voipio <=