aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorTimothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk>2016-05-27 15:51:56 +0100
committerRiku Voipio <riku.voipio@linaro.org>2016-06-07 16:39:08 +0300
commita0995886e23323258d0612c71f8b0416a02806f2 (patch)
tree76197e6eeb2b670e4c697cc35e2a3c448d72a3a0 /linux-user
parentf59ec606104ade2443179231fc7a3cb98683ac85 (diff)
downloadqemu-a0995886e23323258d0612c71f8b0416a02806f2.zip
qemu-a0995886e23323258d0612c71f8b0416a02806f2.tar.gz
qemu-a0995886e23323258d0612c71f8b0416a02806f2.tar.bz2
linux-user: Restart exit() if signal pending
Without this a signal could vanish on thread exit. Signed-off-by: Timothy Edward Baldwin <T.E.Baldwin99@members.leeds.ac.uk> Message-id: 1441497448-32489-26-git-send-email-T.E.Baldwin99@members.leeds.ac.uk Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c8
1 files 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;