From nobody@FreeBSD.org  Tue Dec 19 20:27:11 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 1D9F737B400
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Dec 2000 20:27:07 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id eBK4R7d40265;
	Tue, 19 Dec 2000 20:27:07 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200012200427.eBK4R7d40265@freefall.freebsd.org>
Date: Tue, 19 Dec 2000 20:27:07 -0800 (PST)
From: andy@silverbrook.com.au
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: gdb won't exit if attached process disappears
X-Send-Pr-Version: www-1.0

>Number:         23678
>Category:       gnu
>Synopsis:       gdb won't exit if attached process disappears
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 19 20:30:01 PST 2000
>Closed-Date:    Fri Jan 11 03:52:11 PST 2002
>Last-Modified:  Fri Jan 11 05:23:03 PST 2002
>Originator:     Andy Newman
>Release:        RELENG_4
>Organization:
Silverbrook Research
>Environment:
FreeBSD bebop.silverbrook.com.au 4.2-STABLE FreeBSD 4.2-STABLE #0: Wed Nov 22 08:52:41 EST 2000     toor@bebop.silverbrook.com.au:/usr/obj/usr/src/sys/bebop  i386

>Description:
If gdb is attached to a process and that process subsequently exits
prior to gdb detaching then gdb fails to detach, issues an error
message and won't exit.  You have to kill gdb to quit.

Here's a sample of gdb's output at such a time,
(gdb) Quit
(gdb) The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /home/andy/tmp/tstp, process 25834, thread 1
ptrace: No such process.
(gdb)

>How-To-Repeat:
Attach to process in gdb. Have process exit. Then try to quit gdb.

>Fix:
Seems likely to be a simple test of errno at the appropriate point.


>Release-Note:
>Audit-Trail:

From: k Macy <kip_macy@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc: andy@silverbrook.com.au
Subject: Re: gnu/23678: gdb won't exit if attached process disappears
Date: Mon, 7 Jan 2002 12:28:56 -0800 (PST)

 Can you give an example of a program for which this
 happens? When I try attaching to a running gdb (on 
 4.5-PRERELEASE) and then exit out of the target gdb
 it just says:
 Program exited normally.
 (gdb) quit
 
 
 __________________________________________________
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/
State-Changed-From-To: open->feedback 
State-Changed-By: sheldonh 
State-Changed-When: Tue Jan 8 09:07:12 PST 2002 
State-Changed-Why:  
Kip Macy has asked for more details, having failed to reproduce 
the problem locally. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23678 

From: Andy Newman <andy.newman@silverbrookresearch.com>
To: freebsd-gnats-submit@FreeBSD.org, andy@silverbrook.com.au
Cc:  
Subject: Re: gnu/23678: gdb won't exit if attached process disappears
Date: Tue, 08 Jan 2002 10:06:11 +1100

 Re-testing this shows the problem to have gone.   Updates over the 
 months since
 lodging seem to have fixed things.
 
 
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Fri Jan 11 03:52:11 PST 2002 
State-Changed-Why:  
The originator reports that the problem has been resolved. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23678 
>Unformatted:
