tech-userlevel archive

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

/bin/sh: set -e is broken again

The following commit introduced serious regression
in shell's 'set -e' since 5.1

   revision 1.99
   date: 2010/06/03 16:06:48;  author: christos;  state: Exp;  lines: +3 -3
   set -e is supposed to work inside eval; skip EV_TESTED.

Try to run this code


   set -e
   if eval false; then
      echo 'Impossible!'
      echo 'Ok'

Current's shell unexpectedly exits at 'if' statement.

FreeBSD's fix for the same problem is here.

I didn't try it.

Best regards, Aleksey Cheusov.

Home | Main Index | Thread Index | Old Index