* GDB is not trapping SIGINT @ 2006-04-03 4:59 Andy Howell 2006-04-03 13:21 ` Daniel Jacobowitz 0 siblings, 1 reply; 3+ messages in thread From: Andy Howell @ 2006-04-03 4:59 UTC (permalink / raw) To: gdb Hello, I'm having problems getting GDB to not pass SIGINT to my program. In my main thread I do a sigwait for SIGINT. When I'm debugging, I don't want this called. "info handle" shows that SIGINT should not be being passed to my app. I using GDB 6.3 on RH Linux. Any ideas? Andy ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB is not trapping SIGINT 2006-04-03 4:59 GDB is not trapping SIGINT Andy Howell @ 2006-04-03 13:21 ` Daniel Jacobowitz 2006-04-04 5:33 ` Andy Howell 0 siblings, 1 reply; 3+ messages in thread From: Daniel Jacobowitz @ 2006-04-03 13:21 UTC (permalink / raw) To: Andy Howell; +Cc: gdb On Sun, Apr 02, 2006 at 11:58:59PM -0500, Andy Howell wrote: > Hello, > > I'm having problems getting GDB to not pass SIGINT to my program. In my > main thread I do a sigwait for SIGINT. When I'm debugging, I don't want > this called. "info handle" shows that SIGINT should not be being passed > to my app. > > I using GDB 6.3 on RH Linux. But how are you using it? :-) An example, please. You also did not mention what kernel version you are using; at least one sigwait-related kernel bug has been reported. And it looks like it is still present in current 2.6 kernels, so you may want to report this to the kernel developers. sys_rt_sigtimedwait calls dequeue_signal, but never lets ptrace see it. Maybe the bits from get_signal_to_deliver can be moved into dequeue_signal now. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB is not trapping SIGINT 2006-04-03 13:21 ` Daniel Jacobowitz @ 2006-04-04 5:33 ` Andy Howell 0 siblings, 0 replies; 3+ messages in thread From: Andy Howell @ 2006-04-04 5:33 UTC (permalink / raw) To: Daniel Jacobowitz, gdb Daniel Jacobowitz wrote: > On Sun, Apr 02, 2006 at 11:58:59PM -0500, Andy Howell wrote: >> Hello, >> >> I'm having problems getting GDB to not pass SIGINT to my program. In my >> main thread I do a sigwait for SIGINT. When I'm debugging, I don't want >> this called. "info handle" shows that SIGINT should not be being passed >> to my app. >> >> I using GDB 6.3 on RH Linux. > > But how are you using it? :-) An example, please. > You also did not mention what kernel version you are using; at least > one sigwait-related kernel bug has been reported. And it looks like > it is still present in current 2.6 kernels, so you may want to report > this to the kernel developers. sys_rt_sigtimedwait calls > dequeue_signal, but never lets ptrace see it. Maybe the bits from > get_signal_to_deliver can be moved into dequeue_signal now. > Daniel, Sorry for previous lack of details. It does seem to be Linux specific. I see the same behavior in Redhat Linux 2.4.21-4.EL and 2.6.9-22.0.2.EL, as well as Fedora 3 2.6.12. On solaris 2.8 it works fine. It sounds like without a kernel patch, I'm out of luck. Thanks for your help. For what its worth, my program first creates a signal set, block new threads from seeing them, and then the main thread waits for a signal: ::sigemptyset( &set ); ::sigaddset( &set, SIGINT ); ::sigaddset( &set, SIGQUIT ); ::sigaddset( &set, SIGUSR2 ); .... more signals // Block new threads from getting signals pthread_sigmask( SIG_BLOCK &set, NULL ); // Create a bunch of threads ..... // wait for signal do { sigErr = sigwait( &set, &sig ); if( sig == SIGUSR2 ) { doSomething(...) } while( sig = SIGUSR2 ) // Do cleanup and exit Thanks, Andy ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-04-04 5:33 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-04-03 4:59 GDB is not trapping SIGINT Andy Howell 2006-04-03 13:21 ` Daniel Jacobowitz 2006-04-04 5:33 ` Andy Howell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox