From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 15 17:50:24 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F54916A4D8 for ; Wed, 15 Sep 2004 17:50:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1B2043D3F for ; Wed, 15 Sep 2004 17:50:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8FHoNxo056983 for ; Wed, 15 Sep 2004 17:50:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8FHoN6P056982; Wed, 15 Sep 2004 17:50:23 GMT (envelope-from gnats) Date: Wed, 15 Sep 2004 17:50:23 GMT Message-Id: <200409151750.i8FHoN6P056982@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Chris Johnson Subject: Re: bin/71769: install command sets improper exit values X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Chris Johnson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2004 17:50:24 -0000 The following reply was made to PR bin/71769; it has been noted by GNATS. From: Chris Johnson To: freebsd-gnats-submit@FreeBSD.org, chris@claimlynx.com Cc: Subject: Re: bin/71769: install command sets improper exit values Date: Wed, 15 Sep 2004 12:45:30 -0500 Strangely, this seems to be related to running "install" within shell scripts only as it works fine from the command line. More strange still is that a quick look at the xinstall.c code does not show any way that the exit code can be set to 1! Is this a /bin/sh problem instead? Here's my minimal test case for reproducing the problem (with some extra LFs for easier reading): 219 test> cat bar #!/bin/sh /usr/bin/install -d $1 echo $# 220 test> /bin/sh $ /usr/bin/install -d foob $ echo $# 0 $ exit 221 test> rmdir foob 222 test> bar foob 1 What the devil?