qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] main-loop.c: Handle SIGINT, SIGHUP and SIGTERM


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] main-loop.c: Handle SIGINT, SIGHUP and SIGTERM synchronously
Date: Fri, 26 Sep 2014 12:25:31 +0100

On 26 September 2014 11:37, Alex Bennée <address@hidden> wrote:
>
> Peter Maydell <address@hidden> writes:
>
>> Add the termination signals SIGINT, SIGHUP and SIGTERM to the
>> list of signals which we handle synchronously via a signalfd.
>> This avoids a race condition where if we took the SIGTERM
>> in the middle of qemu_shutdown_requested:
>>     int r = shutdown_requested;
>> [SIGTERM here...]
>>     shutdown_requested = 0;
>>
>> then the setting of the shutdown_requested flag by
>> termsig_handler() would be lost and QEMU would fail to
>> shut down. This was causing 'make check' to hang occasionally.
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>> Cc: address@hidden
> <snip>
>
> I've been testing it with my latest Travis patches (- the make check
> once patch) and it seems a lot better now:
>
> Reviewed-by: Alex Bennée <address@hidden>
> Tested-by: Alex Bennée <address@hidden>

Thanks; applied to master.

-- PMM



reply via email to

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