Date: Sun, 13 Oct 1996 20:06:54 -0700 (PDT) From: george@cia-g.com To: freebsd-gnats-submit@freebsd.org Subject: bin/1793: /bin/sh return w/o exitstatus in a function sets exitstatus to true Message-ID: <199610140306.UAA21113@freefall.freebsd.org> Resent-Message-ID: <199610140310.UAA21230@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610140306.UAA21113>