qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 24/34] linux-user: Restart execve() if signal pe


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 24/34] linux-user: Restart execve() if signal pending
Date: Fri, 11 Sep 2015 15:36:07 +0100

On 6 September 2015 at 00:57, Timothy E Baldwin
<address@hidden> wrote:
> 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;

Reviewed-by: Peter Maydell <address@hidden>

but should this be earlier in the patch series?

thanks
-- PMM



reply via email to

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