[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/44] linux-user: Restart exit() if signal pending
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 19/44] linux-user: Restart exit() if signal pending |
Date: |
Wed, 8 Jun 2016 16:30:00 +0300 |
From: Timothy E Baldwin <address@hidden>
Without this a signal could vanish on thread exit.
Signed-off-by: Timothy Edward Baldwin <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index aa5517c..f3061a9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6640,8 +6640,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
arg1,
However in threaded applictions it is used for thread termination,
and _exit_group is used for application termination.
Do thread termination if we have more then one thread. */
- /* FIXME: This probably breaks if a signal arrives. We should probably
- be disabling signals. */
+
+ if (block_signals()) {
+ ret = -TARGET_ERESTARTSYS;
+ break;
+ }
+
if (CPU_NEXT(first_cpu)) {
TaskState *ts;
--
2.1.4
- [Qemu-devel] [PULL 11/44] linux-user: Use safe_syscall for sigsuspend syscalls, (continued)
- [Qemu-devel] [PULL 11/44] linux-user: Use safe_syscall for sigsuspend syscalls, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 13/44] linux-user: Remove redundant default action check in queue_signal(), riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 18/44] linux-user: pause() should not pause if signal pending, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 14/44] linux-user: Remove redundant gdb_queuesig(), riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 12/44] linux-user: Fix race between multiple signals, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 16/44] linux-user: Queue synchronous signals separately, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 17/44] linux-user: Block signals during sigaction() handling, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 24/44] linux-user: provide frame information in x86-64 safe_syscall, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 15/44] linux-user: Remove real-time signal queuing, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 23/44] linux-user: Avoid possible misalignment in target_to_host_siginfo(), riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 19/44] linux-user: Restart exit() if signal pending,
riku . voipio <=
- [Qemu-devel] [PULL 20/44] linux-user: Use safe_syscall for kill, tkill and tgkill syscalls, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 25/44] linux-user: Fix handling of arm_fadvise64_64 syscall, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 21/44] linux-user: Restart fork() if signals pending, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 28/44] linux-user: Use safe_syscall wrapper for readv and writev syscalls, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 22/44] linux-user: Use both si_code and si_signo when converting siginfo_t, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 26/44] linux-user: Fix NR_fadvise64 and NR_fadvise64_64 for 32-bit guests, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 33/44] linux-user: Use safe_syscall wrapper for flock, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 30/44] linux-user: Use safe_syscall wrapper for send* and recv* syscalls, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 29/44] linux-user: Use safe_syscall wrapper for connect syscall, riku . voipio, 2016/06/08
- [Qemu-devel] [PULL 37/44] linux-user: Use safe_syscall wrapper for epoll_wait syscalls, riku . voipio, 2016/06/08