From owner-freebsd-bugs Sun Oct 13 20:10:05 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA21237 for bugs-outgoing; Sun, 13 Oct 1996 20:10:05 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA21230; Sun, 13 Oct 1996 20:10:03 -0700 (PDT) Resent-Date: Sun, 13 Oct 1996 20:10:03 -0700 (PDT) Resent-Message-Id: <199610140310.UAA21230@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Received: (from nobody@localhost)by.freefall.freebsd.org.id.UAA21113;Sun; (8.7.5/8.7.3);, 13 Oct 1996 20:06:54.-0700 (PDT) Message-Id: <199610140306.UAA21113@freefall.freebsd.org> Date: Sun, 13 Oct 1996 20:06:54 -0700 (PDT) From: george@cia-g.com To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: bin/1793: /bin/sh return w/o exitstatus in a function sets exitstatus to true Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1793 >Category: bin >Synopsis: /bin/sh return w/o exitstatus in a function sets exitstatus to true >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 13 20:10:01 PDT 1996 >Last-Modified: >Originator: George Simunovich >Organization: >Release: 2.2-current >Environment: 2.2-CURRENT FreeBSD 2.2-CURRENT #0: Sat Oct 12 13:26:46 MDT 1996 >Description: A return without an exit status in a sh functino sets the exit status to true. bash works as does /bin/sh on FreeBSD 2.1.0-RELEASE >How-To-Repeat: When the following script is run it echos "True Condition". #!/bin/sh Tester() { false return } if Tester then echo "True Condition" else echo "Not True Condition" fi >Fix: use bash? >Audit-Trail: >Unformatted: