From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXStv-0005mN-43 for qemu-devel@nongnu.org; Fri, 26 Sep 2014 06:37:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXStq-0008VC-M9 for qemu-devel@nongnu.org; Fri, 26 Sep 2014 06:37:23 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:33204 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXStq-0008UP-0F for qemu-devel@nongnu.org; Fri, 26 Sep 2014 06:37:18 -0400 References: <1411660269-11081-1-git-send-email-peter.maydell@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= Message-ID: <87mw9m1xhg.fsf@linaro.org> In-reply-to: <1411660269-11081-1-git-send-email-peter.maydell@linaro.org> Date: Fri, 26 Sep 2014 11:37:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] main-loop.c: Handle SIGINT, SIGHUP and SIGTERM synchronously List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , qemu-devel@nongnu.org, Stefan Hajnoczi , patches@linaro.org Peter Maydell 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 > Cc: qemu-stable@nongnu.org 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 Tested-by: Alex Bennée -- Alex Bennée