Revert "main-loop.c: Handle SIGINT, SIGHUP and SIGTERM, synchronously"
PATCH 1/1 Revert "main-loop.c: Handle SIGINT, SIGHUP and SIGTERM, synchronously"
From: Jan Kiszka <[email protected]>
This reverts commit 15124e142034d21341ec9f1a304a1dc5a6c25681. It breaks debuggability of qemu.
---
Feel free to apply this before or after "Make qemu_shutdown_requested signal-safe".
main-loop.c | 3 --- 1 file changed, 3 deletions(-)
main-loop.c +0 -3
@@ -84,9 +84,6 @@ static int qemu_signal_init(void)sigaddset (&set,SIGIO );sigaddset (&set,SIGALRM );sigaddset (&set,SIGBUS ); -sigaddset (&set,SIGINT ); -sigaddset (&set,SIGHUP ); -sigaddset (&set,SIGTERM );pthread_sigmask (SIG_BLOCK , &set,NULL );sigdelset (&set,SIG_IPI );
Signature · 1 line
1.8.4.5
Quoted 8 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
This reverts commit
15124e142034d21341ec9f1a304a1dc5a6c25681. It breaks debuggability of qemu.Signed-off-by Jan Kiszka <[email protected]>---
Thanks, please add my 'Reported-by' tag and
Quoted 20 lines
Feel free to apply this before or after "Make
qemu_shutdown_requestedsignal-safe".main-loop.c | 3 --- 1 file changed, 3 deletions(-)main-loop.c +0
-3@@ -84,9 +84,6 @@ static int qemu_signal_init(void)sigaddset (&set,SIGIO );sigaddset (&set,SIGALRM );sigaddset (&set,SIGBUS ); -sigaddset (&set,SIGINT ); -sigaddset (&set,SIGHUP ); -sigaddset (&set,SIGTERM );pthread_sigmask (SIG_BLOCK , &set,NULL );sigdelset (&set,SIG_IPI );
Quoted 19 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
This reverts commit
15124e142034d21341ec9f1a304a1dc5a6c25681. It breaks debuggability of qemu.Signed-off-by Jan Kiszka <[email protected]>---
Feel free to apply this before or after "Make
qemu_shutdown_requestedsignal-safe".main-loop.c | 3 --- 1 file changed, 3 deletions(-)main-loop.c +0
-0
main-loop.c static int qemu_signal_init(void) · line 89
Quoted 6 lines
main-loop.c +0
-3@@ -84,9 +84,6 @@ static int qemu_signal_init(void)sigaddset (&set,SIGIO );sigaddset (&set,SIGALRM );sigaddset (&set,SIGBUS ); -sigaddset (&set,SIGINT ); -sigaddset (&set,SIGHUP ); -sigaddset (&set,SIGTERM );
I'm planning to apply this patch but with the following comment added here:
/* Note that the SIGINT, SIGTERM and SIGHUP signals are not handled
* via signalfd, and so their handlers will still be invoked
* asynchronously. This is done so that ^C can be used to interrupt
* QEMU when it is being run under gdb.
*/
(which does make the commit not a pure revert).
Quoted 5 lines
main-loop.c +0
-1pthread_sigmask (SIG_BLOCK , &set,NULL );sigdelset (&set,SIG_IPI ); --1.8.4.5
thanks
-- PMM
Quoted 27 lines · Peter Maydell
Quoted 19 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
This reverts commit
15124e142034d21341ec9f1a304a1dc5a6c25681. It breaks debuggability of qemu.Signed-off-by Jan Kiszka <[email protected]>---
Feel free to apply this before or after "Make
qemu_shutdown_requestedsignal-safe".main-loop.c | 3 --- 1 file changed, 3 deletions(-)main-loop.c +0
-0main-loop.c static int qemu_signal_init(void) · line 89
Quoted 6 lines
main-loop.c +0
-3@@ -84,9 +84,6 @@ static int qemu_signal_init(void)sigaddset (&set,SIGIO );sigaddset (&set,SIGALRM );sigaddset (&set,SIGBUS ); -sigaddset (&set,SIGINT ); -sigaddset (&set,SIGHUP ); -sigaddset (&set,SIGTERM );
Quoted 7 lines
I'm planning to apply this patch but with the following comment added here:
/* Note that the SIGINT, SIGTERM and SIGHUP signals are not handled
* via signalfd, and so their handlers will still be invoked
* asynchronously. This is done so that ^C can be used to interrupt
* QEMU when it is being run under gdb.
*/
What about:
/* SIGINT cannot be handled via signalfd, so that ^C can be used
* to interrupt QEMU when it is being run under gdb. SIGHUP and
* SIGTERM are also handled asynchronously, even though it is not
* strictly necessary, because they use the same handler as SIGINT. */
Quoted 11 lines
(which does make the commit not a pure revert).
Quoted 5 lines
main-loop.c +0
-1pthread_sigmask (SIG_BLOCK , &set,NULL );sigdelset (&set,SIG_IPI ); --1.8.4.5
thanks
-- PMM
Quoted 38 lines · Paolo Bonzini
Quoted 27 lines · Peter Maydell
Quoted 19 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
This reverts commit
15124e142034d21341ec9f1a304a1dc5a6c25681. It breaks debuggability of qemu.Signed-off-by Jan Kiszka <[email protected]>---
Feel free to apply this before or after "Make
qemu_shutdown_requestedsignal-safe".main-loop.c | 3 --- 1 file changed, 3 deletions(-)main-loop.c +0
-0main-loop.c static int qemu_signal_init(void) · line 89
Quoted 6 lines
main-loop.c +0
-3@@ -84,9 +84,6 @@ static int qemu_signal_init(void)sigaddset (&set,SIGIO );sigaddset (&set,SIGALRM );sigaddset (&set,SIGBUS ); -sigaddset (&set,SIGINT ); -sigaddset (&set,SIGHUP ); -sigaddset (&set,SIGTERM );Quoted 7 lines
I'm planning to apply this patch but with the following comment added here:
/* Note that the SIGINT, SIGTERM and SIGHUP signals are not handled
* via signalfd, and so their handlers will still be invoked
* asynchronously. This is done so that ^C can be used to interrupt
* QEMU when it is being run under gdb.
*/
Quoted 7 lines
What about:
/* SIGINT cannot be handled via signalfd, so that ^C can be used
* to interrupt QEMU when it is being run under gdb. SIGHUP and
* SIGTERM are also handled asynchronously, even though it is not
* strictly necessary, because they use the same handler as SIGINT. */
Looks good to me, I'll use that wording.
-- PMM
Peter Maydell
AppliedQuoted 10 lines · Peter Maydell
Quoted 7 lines · Paolo Bonzini
What about:
/* SIGINT cannot be handled via signalfd, so that ^C can be used
* to interrupt QEMU when it is being run under gdb. SIGHUP and
* SIGTERM are also handled asynchronously, even though it is not
* strictly necessary, because they use the same handler as SIGINT. */Looks good to me, I'll use that wording.
Applied this and the other patch to master, thanks.
-- PMM