ash bug (was: [BusyBox] BusyBox 1.0.0-pre2 released)
Jean Wolter
jean.wolter at inf.tu-dresden.de
Wed Jul 30 15:21:30 UTC 2003
Hello,
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
set -x
echo foo > echo.log 2>&1
set +x
echo "bug-log:"
cat bug.log
echo
echo "echo.log"
cat echo.log
busybox ash:
# sh bug.sh
bug-log:
+ set +x
echo.log
+ echo foo
foo
bash:
/home/jw5> sh bug.sh
bug-log:
+ echo foo
+ set +x
echo.log
foo
regards,
Jean
More information about the busybox
mailing list