This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] ser-pipe.c (pipe_open): Ignore SIGINTs in child.
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Mon, 26 Apr 2010 20:52:20 -0700 (PDT)
- Subject: [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)