public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* SIGINT not passed to process on cygwin
@ 2005-09-12  6:07 Himanshu Chandola
  2005-09-12  7:21 ` Nick Roberts
  0 siblings, 1 reply; 6+ messages in thread
From: Himanshu Chandola @ 2005-09-12  6:07 UTC (permalink / raw)
  To: gdb

Has anyone encountered the following:
attach gdb on cygwin to a running process. Send SIGINT to the process. 
gdb handles SIGINT and stops.  Try to continue the running process , the 
SIGINT is not passed to the process. Worse Ctrl + C interrupts don't 
work on the running gdb.
gdb version :6.3.50_2004-12-28-cvs (cygwin-special)

any help would be really appreciated
thanks

Himanshu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* SIGINT not passed to process on cygwin
  2005-09-12  6:07 SIGINT not passed to process on cygwin Himanshu Chandola
@ 2005-09-12  7:21 ` Nick Roberts
  2005-09-12  7:43   ` Himanshu Chandola
  2005-09-12 14:30   ` Christopher Faylor
  0 siblings, 2 replies; 6+ messages in thread
From: Nick Roberts @ 2005-09-12  7:21 UTC (permalink / raw)
  To: Himanshu Chandola; +Cc: gdb

Himanshu Chandola writes:
 > Has anyone encountered the following:
 > attach gdb on cygwin to a running process. Send SIGINT to the process. 
 > gdb handles SIGINT and stops.  Try to continue the running process , the 
 > SIGINT is not passed to the process. 

By default, GDB doesn't pass SIGINT to the process:

(gdb) info signal 2
Signal        Stop      Print   Pass to program Description
SIGINT        Yes       Yes     No              Interrupt

If you want it to do so, type:

(gdb) handle 2 pass

 >                                          Worse Ctrl + C interrupts don't 
 > work on the running gdb.
 > gdb version :6.3.50_2004-12-28-cvs (cygwin-special)

Assuming Cygwin has stty, if you type "stty -a" what is SIGINT (intr) bound
to?  Does it say ^C does anything?  If you want it to send SIGINT type:

stty intr ^C  (remember to use quoted-insert (^V) before typing ^C).

Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SIGINT not passed to process on cygwin
  2005-09-12  7:21 ` Nick Roberts
@ 2005-09-12  7:43   ` Himanshu Chandola
  2005-09-12 10:06     ` Dave Korn
  2005-09-12 14:30   ` Christopher Faylor
  1 sibling, 1 reply; 6+ messages in thread
From: Himanshu Chandola @ 2005-09-12  7:43 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

thanks that helped.
Although in cygwin ^C is set to intr, the problem continued to be the same.
The ^C on gdb didn't stop it.

Himanshu
Nick Roberts wrote:

>Himanshu Chandola writes:
> > Has anyone encountered the following:
> > attach gdb on cygwin to a running process. Send SIGINT to the process. 
> > gdb handles SIGINT and stops.  Try to continue the running process , the 
> > SIGINT is not passed to the process. 
>
>By default, GDB doesn't pass SIGINT to the process:
>
>(gdb) info signal 2
>Signal        Stop      Print   Pass to program Description
>SIGINT        Yes       Yes     No              Interrupt
>
>If you want it to do so, type:
>
>(gdb) handle 2 pass
>
> >                                          Worse Ctrl + C interrupts don't 
> > work on the running gdb.
> > gdb version :6.3.50_2004-12-28-cvs (cygwin-special)
>
>Assuming Cygwin has stty, if you type "stty -a" what is SIGINT (intr) bound
>to?  Does it say ^C does anything?  If you want it to send SIGINT type:
>
>stty intr ^C  (remember to use quoted-insert (^V) before typing ^C).
>
>Nick
>
>  
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: SIGINT not passed to process on cygwin
  2005-09-12  7:43   ` Himanshu Chandola
@ 2005-09-12 10:06     ` Dave Korn
  0 siblings, 0 replies; 6+ messages in thread
From: Dave Korn @ 2005-09-12 10:06 UTC (permalink / raw)
  To: 'Himanshu Chandola'; +Cc: gdb

----Original Message----
>From: Himanshu Chandola
>Sent: 12 September 2005 08:44

> thanks that helped.
> Although in cygwin ^C is set to intr, the problem continued to be the
> same. 
> The ^C on gdb didn't stop it.
> 
> Himanshu

  Do you have CYGWIN=tty set in your environment?

http://cygwin.com/cygwin-ug-net/using-cygwinenv.html

"(no)tty - if set, Cygwin enables extra support (i.e., termios) for
UNIX-like ttys in the Windows console. It is not compatible with some
Windows programs. Defaults to not set, in which case the tty is opened in
text mode. Note that this has been changed such that ^D works as expected
instead of ^Z, and is settable via stty. This option must be specified
before starting a Cygwin shell and it cannot be changed in the shell. It
should not be set when using other terminals (i.e., rxvt or xterm)."


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SIGINT not passed to process on cygwin
  2005-09-12  7:21 ` Nick Roberts
  2005-09-12  7:43   ` Himanshu Chandola
@ 2005-09-12 14:30   ` Christopher Faylor
  2005-09-12 14:35     ` Re[2]: " Konstantin Karganov
  1 sibling, 1 reply; 6+ messages in thread
From: Christopher Faylor @ 2005-09-12 14:30 UTC (permalink / raw)
  To: gdb, Himanshu Chandola

On Mon, Sep 12, 2005 at 07:21:49PM +1200, Nick Roberts wrote:
>Himanshu Chandola writes:
>>Has anyone encountered the following:
>>attach gdb on cygwin to a running process. Send SIGINT to the process. 
>>gdb handles SIGINT and stops.  Try to continue the running process , the 
>>SIGINT is not passed to the process. 
>
>By default, GDB doesn't pass SIGINT to the process:
>
>(gdb) info signal 2
>Signal        Stop      Print   Pass to program Description
>SIGINT        Yes       Yes     No              Interrupt
>
>If you want it to do so, type:
>
>(gdb) handle 2 pass

Right.  That's what I do when I want the signal to be propagate.

I don't know if this is what is happening but, unfortunately, gdb only
understands windows signals.  Physically pressing CTRL-C is an event
which gdb will recognize as a "SIGINT".  Sending the process a SIGINT
via "kill" or some other method will not be recognized by gdb.

cgf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re[2]: SIGINT not passed to process on cygwin
  2005-09-12 14:30   ` Christopher Faylor
@ 2005-09-12 14:35     ` Konstantin Karganov
  0 siblings, 0 replies; 6+ messages in thread
From: Konstantin Karganov @ 2005-09-12 14:35 UTC (permalink / raw)
  To: gdb

Hello Christopher,

CF> I don't know if this is what is happening but, unfortunately, gdb only
CF> understands windows signals.  Physically pressing CTRL-C is an event
CF> which gdb will recognize as a "SIGINT".  Sending the process a SIGINT
CF> via "kill" or some other method will not be recognized by gdb.
I have the same behavior with gdb-6.3 on RedHat Linux box.
So, I doubt the Cygwin is the cause...

-- 
Best regards,
 Konstantin                            mailto:kostik@ispras.ru


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-09-12 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-12  6:07 SIGINT not passed to process on cygwin Himanshu Chandola
2005-09-12  7:21 ` Nick Roberts
2005-09-12  7:43   ` Himanshu Chandola
2005-09-12 10:06     ` Dave Korn
2005-09-12 14:30   ` Christopher Faylor
2005-09-12 14:35     ` Re[2]: " Konstantin Karganov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).