[patch] ser-pipe.c (pipe_open): Ignore SIGINTs in child.

Doug Evans dje@google.com
Tue Apr 27 03:52:00 GMT 2010


I was debugging "tar rem | ..." today and found that typing ^c
killed the child of the pipe.

I will check this in in a few days if there are no objections.

2010-04-26  Doug Evans  <dje@google.com>

	* ser-pipe.c (pipe_open): Ignore SIGINTs in child.

Index: ser-pipe.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-pipe.c,v
retrieving revision 1.24
diff -u -p -r1.24 ser-pipe.c
--- ser-pipe.c	20 Apr 2010 05:52:07 -0000	1.24
+++ ser-pipe.c	27 Apr 2010 03:49:05 -0000
@@ -98,6 +98,8 @@ pipe_open (struct serial *scb, const cha
   /* Child. */
   if (pid == 0)
     {
+      signal (SIGINT, SIG_IGN);
+
       /* re-wire pdes[1] to stdin/stdout */
       close (pdes[0]);
       if (pdes[1] != STDOUT_FILENO)



More information about the Gdb-patches mailing list