[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 24/34] linux-user: Restart execve() if signal pendin
From: |
Timothy E Baldwin |
Subject: |
[Qemu-devel] [PATCH 24/34] linux-user: Restart execve() if signal pending |
Date: |
Sun, 6 Sep 2015 00:57:18 +0100 |
Without this SIGTERM could fail to terminate the process, as the
signal lost in QEMU's queue.
Signed-off-by: Timothy Edward Baldwin <address@hidden>
---
linux-user/syscall.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 1ce381e..4839154 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -702,6 +702,7 @@ safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int,
options, \
struct rusage *, rusage)
safe_syscall4(int, waitid, idtype_t, idtype, id_t, id, siginfo_t *, infop, \
int, options)
+safe_syscall3(int, execve, const char *, filename, char **, argv, char **,
envp)
static inline int host_to_target_sock_type(int host_type)
@@ -5929,7 +5930,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
}
if (!(p = lock_user_string(arg1)))
goto execve_efault;
- ret = get_errno(execve(p, argp, envp));
+ ret = safe_execve(p, argp, envp);
unlock_user(p, arg1, 0);
goto execve_end;
--
2.1.4
- [Qemu-devel] [PATCH 32/34] linux-user: Support for restarting system calls for S390 targets, (continued)
[Qemu-devel] [PATCH 18/34] linux-user: Fix race between multiple signals, Timothy E Baldwin, 2015/09/05
[Qemu-devel] [PATCH 24/34] linux-user: Restart execve() if signal pending,
Timothy E Baldwin <=
[Qemu-devel] [PATCH 34/34] linux-user: Remove TARGET_USE_ERESTARTSYS, Timothy E Baldwin, 2015/09/05
[Qemu-devel] [PATCH 31/34] linux-user: Support for restarting system calls for M68K targets, Timothy E Baldwin, 2015/09/05
[Qemu-devel] [PATCH 02/34] linux-user: Reindent signal handling, Timothy E Baldwin, 2015/09/05
Re: [Qemu-devel] [PATCH 00/34] linux-user: Fix signal race conditions and SA_RESTART, Peter Maydell, 2015/09/10