On Thu, Feb 14, 2002 at 04:36:36PM +0100, Alexandre Duret-Lutz wrote:
> I managed to reproduce this (on NetBSD 1.5.2), and reduced the
> failure to the following script:
>
> % cat foo.sh
> set -e
> for x in a; do
> BAR="foo"
> false && echo true
> echo mumble
> done
> % sh -x foo.sh
> + set -e
> + BAR=foo
> + false
>
> This ought to print "mumble". It does so if you remove the loop
> or the variable assignment. So that's definitely looks like bug
> in NetBSD's sh.
>
> Could you take care of reporting this bug wherever appropriate?
> (I'm not a NetBSD user myself, and the sh man page doesn't show
> any bug-report address.)
Thank you for the analysis! A search through NetBSD's bug database shows
there is an open report bin/11542 with practically the same test case:
% cat foo.sh
set -e
for x in 1; do
false && true
done
echo "reached end"
(yes, even same file name :) )
Thank you,
Patrick