[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 25/34] linux-user: Restart exit() if signal pend
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 25/34] linux-user: Restart exit() if signal pending |
Date: |
Fri, 11 Sep 2015 15:36:25 +0100 |
On 6 September 2015 at 00:57, Timothy E Baldwin
<address@hidden> wrote:
> Without this a signal could vanish on thread exit.
>
> Signed-off-by: Timothy Edward Baldwin <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 4839154..efe61e3 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -5719,8 +5719,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;
>
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- [Qemu-devel] [PATCH 14/34] linux-user: Use safe_syscall for read and write system calls, (continued)
- [Qemu-devel] [PATCH 14/34] linux-user: Use safe_syscall for read and write system calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 16/34] linux-user: Use safe_syscall for open and openat system calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 08/34] linux-user: Support for restarting system calls for SPARC targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 20/34] linux-user: Remove redundant default action check in queue_signal(), Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 26/34] linux-user: Restart kill() if signal pending, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 25/34] linux-user: Restart exit() if signal pending, Timothy E Baldwin, 2015/09/05
- Re: [Qemu-devel] [PATCH 25/34] linux-user: Restart exit() if signal pending,
Peter Maydell <=
- [Qemu-devel] [PATCH 11/34] linux-user: Support for restarting system calls for SH4 targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 27/34] linux-user: pause() should not pause if signal pending, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 05/34] linux-user: Support for restarting system calls for ARM targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 13/34] linux-user: Fix signal before blocking system calls race and SA_RESTART, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 30/34] linux-user: Support for restarting system calls for OpenRISC targets, Timothy E Baldwin, 2015/09/05