From fanf@dotat.at  Wed Sep 12 17:07:49 2001
Return-Path: <fanf@dotat.at>
Received: from hand.dotat.at (host217-35-41-52.in-addr.btopenworld.com [217.35.41.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9087F37B407
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Sep 2001 17:07:49 -0700 (PDT)
Received: from fanf by hand.dotat.at with local (Exim 3.33 #16)
	id 15hKyb-0001f4-00
	for FreeBSD-gnats-submit@freebsd.org; Thu, 13 Sep 2001 01:07:33 +0000
Message-Id: <E15hKyb-0001f4-00@hand.dotat.at>
Date: Thu, 13 Sep 2001 01:07:33 +0000
From: Tony Finch <dot@dotat.at>
Reply-To: Tony Finch <dot@dotat.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] use err() instead of just exit() when `install` fails
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         30543
>Category:       bin
>Synopsis:       [PATCH] use err() instead of just exit() when `install` fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    fanf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 12 17:10:00 PDT 2001
>Closed-Date:    Fri Jun 21 14:01:09 PDT 2002
>Last-Modified:  Fri Jun 21 14:01:09 PDT 2002
>Originator:     Tony Finch
>Release:        FreeBSD 4.4-RC i386
>Organization:
dotat labs
>Environment:
System: FreeBSD hand.dotat.at 4.4-RC FreeBSD 4.4-RC #4: Sat Sep 1 19:06:27 GMT 2001 fanf@hand.dotat.at:/FreeBSD/obj/FreeBSD/releng4/sys/SHARP i386
>Description:
In some circumstances, `install` can fail mysteriously when trying to
run `strip` in a subprocess.
>How-To-Repeat:
Sorry, I can't remember what triggered this one.
>Fix:

Index: usr.bin/xinstall//xinstall.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/xinstall/xinstall.c,v
retrieving revision 1.38.2.3
diff -u -r1.38.2.3 xinstall.c
--- usr.bin/xinstall//xinstall.c	2001/08/01 06:48:41	1.38.2.3
+++ usr.bin/xinstall//xinstall.c	2001/08/28 22:24:27
@@ -713,7 +713,7 @@
 	default:
 		if (wait(&status) == -1 || status) {
 			(void)unlink(to_name);
-			exit(EX_SOFTWARE);
+			err(EX_SOFTWARE, "wait");
 			/* NOTREACHED */
 		}
 	}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: ru 
State-Changed-When: Thu Sep 13 00:24:46 PDT 2001 
State-Changed-Why:  
I'm still waiting for a review of my patch from Bruce 
which includes this fix as well. 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Thu Sep 13 00:24:46 PDT 2001 
Responsible-Changed-Why:  
My bugs. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30543 
State-Changed-From-To: suspended->analyzed 
State-Changed-By: fanf 
State-Changed-When: Wed May 15 09:34:25 PDT 2002 
State-Changed-Why:  
ru has asked me to take care of this PR 


Responsible-Changed-From-To: ru->fanf 
Responsible-Changed-By: fanf 
Responsible-Changed-When: Wed May 15 09:34:25 PDT 2002 
Responsible-Changed-Why:  
ru has asked me to take care of this PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30543 
State-Changed-From-To: analyzed->patched 
State-Changed-By: fanf 
State-Changed-When: Wed May 15 09:53:26 PDT 2002 
State-Changed-Why:  
Change committed, will MFC after 4.6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30543 
State-Changed-From-To: patched->closed 
State-Changed-By: fanf 
State-Changed-When: Fri Jun 21 14:00:23 PDT 2002 
State-Changed-Why:  
Fix has been MFCed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30543 
>Unformatted:
