From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18227 invoked by alias); 27 Apr 2010 03:52:28 -0000 Received: (qmail 18219 invoked by uid 22791); 27 Apr 2010 03:52:28 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Apr 2010 03:52:23 +0000 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id o3R3qL1L018150 for ; Mon, 26 Apr 2010 20:52:21 -0700 Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.18.118.116]) by wpaz33.hot.corp.google.com with ESMTP id o3R3qKhA026635 for ; Mon, 26 Apr 2010 20:52:20 -0700 Received: by ruffy.mtv.corp.google.com (Postfix, from userid 67641) id 0C02F84C2B; Mon, 26 Apr 2010 20:52:20 -0700 (PDT) To: gdb-patches@sourceware.org Subject: [patch] ser-pipe.c (pipe_open): Ignore SIGINTs in child. Message-Id: <20100427035220.0C02F84C2B@ruffy.mtv.corp.google.com> Date: Tue, 27 Apr 2010 03:52:00 -0000 From: dje@google.com (Doug Evans) X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00904.txt.bz2 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 * 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)