SIGINT not passed to process on cygwin

Nick Roberts
2005-09-12T07:21:43Z

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