logo       

ash bug (was: BusyBox 1.0.0-pre2 released): msg#00256

linux.busybox

Subject: ash bug (was: BusyBox 1.0.0-pre2 released)

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise