From: Maxim Kuvyrkov <maxim@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/4] Handle SIGKILL and SIGCHLD
Date: Mon, 01 Mar 2010 22:32:16 +0300 [thread overview]
Message-ID: <4B8C1640.1090509@codesourcery.com> (raw)
In-Reply-To: <4B8C133D.2030900@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: 0002-Handle-SIGKILL-and-SIGCHLD.patch --]
[-- Type: text/plain, Size: 2276 bytes --]
>From a659ff77804712826c1c1fe739339f1b1a172ed6 Mon Sep 17 00:00:00 2001
From: Maxim Kuvyrkov <maxim@codesourcery.com>
Date: Mon, 1 Mar 2010 02:39:48 -0800
Subject: [PATCH 2/4] Handle SIGKILL and SIGCHLD
Handle SIGKILL and SIGCHLD in linux user-space emulation.
Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
---
linux-user/signal.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index a560a5c..8f9da80 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -213,6 +213,15 @@ static inline void host_to_target_siginfo_noswap(target_siginfo_t *tinfo,
/* should never come here, but who knows. The information for
the target is irrelevant */
tinfo->_sifields._sigfault._addr = 0;
+ } else if (sig == SIGKILL || sig == SIGCHLD) {
+ tinfo->_sifields._kill._pid = info->si_pid;
+ tinfo->_sifields._kill._uid = info->si_uid;
+
+ if (sig == SIGCHLD) {
+ tinfo->_sifields._sigchld._status = info->si_status;
+ tinfo->_sifields._sigchld._utime = info->si_utime;
+ tinfo->_sifields._sigchld._stime = info->si_stime;
+ }
} else if (sig == SIGIO) {
tinfo->_sifields._sigpoll._fd = info->si_fd;
} else if (sig >= TARGET_SIGRTMIN) {
@@ -236,6 +245,18 @@ static void tswap_siginfo(target_siginfo_t *tinfo,
sig == SIGBUS || sig == SIGTRAP) {
tinfo->_sifields._sigfault._addr =
tswapl(info->_sifields._sigfault._addr);
+ } else if (sig == SIGKILL || sig == SIGCHLD) {
+ tinfo->_sifields._kill._pid = tswap32(info->_sifields._kill._pid);
+ tinfo->_sifields._kill._uid = tswap32(info->_sifields._kill._uid);
+
+ if (sig == SIGCHLD) {
+ tinfo->_sifields._sigchld._status
+ = tswap32(info->_sifields._sigchld._status);
+ tinfo->_sifields._sigchld._utime
+ = tswap32(info->_sifields._sigchld._utime);
+ tinfo->_sifields._sigchld._stime
+ = tswap32(info->_sifields._sigchld._stime);
+ }
} else if (sig == SIGIO) {
tinfo->_sifields._sigpoll._fd = tswap32(info->_sifields._sigpoll._fd);
} else if (sig >= TARGET_SIGRTMIN) {
--
1.6.2.4
next prev parent reply other threads:[~2010-03-01 19:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-01 19:19 [Qemu-devel] [PATCH 0/4] Support NPTL support for ColdFire and related fixes Maxim Kuvyrkov
2010-03-01 19:31 ` [Qemu-devel] [PATCH 1/4] Add NPTL support for ColdFire Maxim Kuvyrkov
2010-03-01 19:32 ` Maxim Kuvyrkov [this message]
2010-03-01 19:32 ` [Qemu-devel] [PATCH 3/4] Fix signal handling " Maxim Kuvyrkov
2010-03-03 13:17 ` Richard Henderson
2010-03-03 13:36 ` Maxim Kuvyrkov
2010-03-01 19:33 ` [Qemu-devel] [PATCH 4/4] Define MMAP_SHIFT " Maxim Kuvyrkov
2010-05-21 9:45 ` [Qemu-devel] {PING}[PATCH 0/4] Support NPTL support for ColdFire and related fixes Maxim Kuvyrkov
2010-07-15 8:51 ` [Qemu-devel] {PING^2} [PATCH " Maxim Kuvyrkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B8C1640.1090509@codesourcery.com \
--to=maxim@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).