qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]