On Fri, Apr 05, 2013 at 06:30:02AM +0000, Lal Nitesh-B44382 wrote: > I was trying to figure out how SIGUSR1 is been handled by QEMU as I am > getting multiple SIGUSR1 in my trace when I run the guest . > If anyone could guide me on this, that would be of great help.
Use grep: $ git grep SIGUSR1 include/qemu/main-loop.h:#define SIG_IPI SIGUSR1 $ git grep SIG_IPI cpus.c: sigaddset(&waitset, SIG_IPI); cpus.c: } while (sigismember(&chkset, SIG_IPI) || sigismember(&chkset, SIGBUS)); cpus.c: sigaction(SIG_IPI, &sigact, NULL); cpus.c: sigdelset(&set, SIG_IPI); cpus.c: sigaction(SIG_IPI, &sigact, NULL); cpus.c: sigaddset(&set, SIG_IPI); cpus.c: sigaddset(&waitset, SIG_IPI); cpus.c: err = pthread_kill(cpu->thread->thread, SIG_IPI); include/qemu/main-loop.h:#define SIG_IPI SIGUSR1 main-loop.c: * SIG_IPI must be blocked in the main thread and must not be caught main-loop.c: sigaddset(&set, SIG_IPI); main-loop.c: sigdelset(&set, SIG_IPI); SIGUSR1 is used to notify vcpu threads. If SIGUSR1 keeps stopping gdb: $ cat ~/.gdbinit handle SIGUSR1 noprint nostop pass Stefan