From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109143 invoked by alias); 14 May 2015 08:17:30 -0000 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 Received: (qmail 109132 invoked by uid 89); 14 May 2015 08:17:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 14 May 2015 08:17:28 +0000 Received: by pabsx10 with SMTP id sx10so77604936pab.3 for ; Thu, 14 May 2015 01:17:26 -0700 (PDT) X-Received: by 10.66.123.81 with SMTP id ly17mr5888134pab.31.1431591446407; Thu, 14 May 2015 01:17:26 -0700 (PDT) Received: from [192.168.1.35] (76-253-1-90.lightspeed.sntcca.sbcglobal.net. [76.253.1.90]) by mx.google.com with ESMTPSA id xs10sm21625635pab.35.2015.05.14.01.17.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 May 2015 01:17:25 -0700 (PDT) References: <555455E2.3060905@dancol.org> Mime-Version: 1.0 (1.0) In-Reply-To: <555455E2.3060905@dancol.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: Cc: gdb-patches From: pinskia@gmail.com Subject: Re: [RFC] [PATCH] Kill processes, not process groups Date: Thu, 14 May 2015 08:17:00 -0000 To: Daniel Colascione X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00355.txt.bz2 > On May 14, 2015, at 12:59 AM, Daniel Colascione wrote: >=20 > Killing process groups for interruption doesn't make any sense. Say we > have a two-process group [A B], where A is the leader. If we attach to > A and use "interrupt", we accidentally kill B. If we attach to B, > "interrupt" does nothing. Why wouldn't we just signal A? >=20 > This problem is worse in the gdbserver case. Locally, we use > pass_signal, not interrupt, for C-c, and pass_signal does the right > thing. But in the remote case, we have nothing but interrupt, and that > doesn't seem to do users intend. >=20 > commit 8d096e713e46f00bc8bf55743288a24f6222021f > Author: Daniel Colascione > Date: Wed May 13 23:58:24 2015 -0700 >=20 > Kill the process we're dealing with, not the whole group >=20 > diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c > index 4da11c6..8a725fa 100644 > --- a/gdb/gdbserver/linux-low.c > +++ b/gdb/gdbserver/linux-low.c > @@ -4904,7 +4904,7 @@ linux_request_interrupt (void) >=20 > /* Send a SIGINT to the process group. This acts just like the user > typed a ^C on the controlling terminal. */ > - kill (-signal_pid, SIGINT); > + kill (signal_pid, SIGINT); Your patch did not update the comment though. So it raises the question whi= ch is the correct behavior.=20 Thanks, Andrew > } >=20 > /* Copy LEN bytes from inferior's auxiliary vector starting at OFFSET >=20