[Top][All Lists]

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

[Qemu-commits] [qemu/qemu] 15124e: main-loop.c: Handle SIGINT, SIGHUP an

From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 15124e: main-loop.c: Handle SIGINT, SIGHUP and SIGTERM syn...
Date: Fri, 26 Sep 2014 04:30:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 15124e142034d21341ec9f1a304a1dc5a6c25681
  Author: Peter Maydell <address@hidden>
  Date:   2014-09-26 (Fri, 26 Sep 2014)

  Changed paths:
    M main-loop.c

  Log Message:
  main-loop.c: Handle SIGINT, SIGHUP and SIGTERM synchronously

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>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Tested-by: Alex Bennée <address@hidden>
Message-id: address@hidden
Cc: address@hidden

reply via email to

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