Subject: bin/17514: /bin/sh `set -e' does not exit on command not found
To: None <>
From: None <>
List: netbsd-bugs
Date: 07/07/2002 22:22:40
>Number:         17514
>Category:       bin
>Synopsis:       /bin/sh `set -e' does not exit on command not found
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 07 19:23:00 PDT 2002
>Originator:     Darrin B. Jewell
>Release:        NetBSD 1.6_BETA2 via cvs ~20020616T2139Z on netbsd-1-6 branch
System: NetBSD quiteria 1.6_BETA2 NetBSD 1.6_BETA2 (QUITERIA) #13: Thu Jun 20 17:05:07 EDT 2002 dbj@quiteria:/usr/src/sys/arch/macppc/compile/QUITERIA macppc
Architecture: powerpc
Machine: macppc
A /bin/sh script that uses `set -e' does not exit
when it cannot find a command in my path.

the case below works incorrectly
but the case below with an absolute
path works as I expect.

Notice also that the error reporting style is
different between the two.


$ sh ./
this_command_should_not_be_found: not found
Should not still be running
$ cat ./
set -e
echo "Should not still be running"

$ sh ./
./ /this_command_should_not_be_found: not found
$ cat ./
set -e
echo "Should not still be running"