NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/38736: /bin/sh: several problems with 'set -e'



>Number:         38736
>Category:       bin
>Synopsis:       /bin/sh: several problems with 'set -e'
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 24 19:20:00 +0000 2008
>Originator:     cheusov%tut.by@localhost
>Release:        NetBSD 4.0_STABLE
>Organization:
>Environment:
System: NetBSD chen.chizhovka.net 4.0_STABLE NetBSD 4.0_STABLE (GENERIC) #3: 
Wed Apr 23 00:58:08 EEST 2008 
cheusov%chen.chizhovka.net@localhost:/srv/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
There are several problems with NetBSD-4 version of /bin/sh and 'set -e'.
>How-To-Repeat:
Run the following code one-by-one. And PLEASE create regression tests
for each case. Also note that "white box" testing whould be good.

case1 (tracked in bin/38584):
    set -e

    echo | false

    echo 'This should not happen!'

case2:
    set -e

    ! true

    echo 'This should not happen'

case3:
   set -e
 
   true | false &
   job=$!

   wait $job
   echo $?
 
   echo 'This should not happen'

case4:
   set -e
 
   false && false
 
   echo 'This should not happen'

>Fix:

Unknown


Home | Main Index | Thread Index | Old Index