From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6903 invoked by alias); 25 Feb 2003 00:10:32 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6893 invoked from network); 25 Feb 2003 00:10:32 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 25 Feb 2003 00:10:32 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h1P0AWe06024 for ; Mon, 24 Feb 2003 19:10:32 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1P0AVq16669; Mon, 24 Feb 2003 19:10:31 -0500 Received: from localhost.localdomain (vpn50-30.rdu.redhat.com [172.16.50.30]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1P0AUI25258; Mon, 24 Feb 2003 19:10:30 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h1P0AOU08082; Mon, 24 Feb 2003 17:10:24 -0700 Date: Tue, 25 Feb 2003 00:10:00 -0000 From: Kevin Buettner Message-Id: <1030225001024.ZM8081@localhost.localdomain> In-Reply-To: "J. Johnston" "RFA: infptrace fix" (Feb 24, 6:31pm) References: <3E5AAB5F.1070408@redhat.com> To: "J. Johnston" , gdb-patches@sources.redhat.com Subject: Re: RFA: infptrace fix MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-02/txt/msg00622.txt.bz2 On Feb 24, 6:31pm, J. Johnston wrote: > The following patch fixes a problem on linux regarding attached > processes. When gdb quits, it goes to detach the process. If the > process has already been killed, the ptrace detach call sets errno. > This causes infptrace.c: detach() to issue a perror_with_name() > call which eventually gets caught and the user is returned to the > gdb prompt. If we try and quit again, we go through the same > sequence and so on and so on. > > The patch recognizes if errno is set to ESRCH, indicating that the > process cannot be found which is ok and should not result in an > error being flagged. > > Ok to install? > > > -- Jeff J. > > 2003-02-24 Jeff Johnston > > * infptrace.c (detach): Do not flag error if ptrace detach fails and > errno is set to ESRCH. This is okay. (For other errors during detach, I wonder if it'd make sense to just issue a warning which decodes the errno...) Kevin