[BusyBox] Re: ash bug
Jean Wolter
jean.wolter at inf.tu-dresden.de
Wed Jul 30 19:20:28 UTC 2003
"Vladimir N. Oleynik" <dzo at simtreas.ru> writes:
> Jean,
>
> > the following small script shows a bug in 1.0.0-pre2 ash. When using
> > set -x (for debugging) and redirection of stderr, ash somehow prints
> > the debug message into the wrong file. It looks like ash does the
> > redirection too early.
> > Script:
>
> > #! /bin/sh
> > exec 2> bug.log
>
> ash ignores this bash extension.
Which part is supposed to be a bash extension? "exec" or "2>"? Try it
on the commandline:
> set -x
> echo foo > foo.log 2>&1
> set +x
+ set +x
> cat foo.log
+ echo foo
foo
The "+ echo foo" should appear on the terminal and not in foo.log.
I am pretty sure that this already worked in the original bourne
shell, at least it worked in every shell I`ve used in the last 8
years.
And:
- it works in busybox 0.60.5
- ash doesn't ignore the sequence, it simply implements it
wrong. It does the redirection before printing the debug output
in evalcommand().
regards,
Jean
More information about the busybox
mailing list