This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]