NetBSD-Bugs archive

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

bin/39792: /bin/ksh bug: if, eval and 'set -e'



>Number:         39792
>Category:       bin
>Synopsis:       /bin/ksh bug: 'eval', 'if' and 'set -e'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 23 20: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: 
Sun Oct 19 20:54:51 EEST 2008 
cheusov%chen.chizhovka.net@localhost:/srv/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:

I think ksh is wrong here.

   0 ~>cat /home/cheusov/tmp/1.sh
   #!/bin/sh

   set -e

   if eval false; then
       echo 'Really?'
   fi

   echo "Ok"
   0 ~>/bin/sh /home/cheusov/tmp/1.sh
   Ok
   0 ~>/bin/ksh /home/cheusov/tmp/1.sh
   1 ~>

>Fix:

Unknown


Home | Main Index | Thread Index | Old Index