[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    ash bug (was: [BusyBox] BusyBox 1.0.0-pre2 released)
From:       Jean Wolter <jean.wolter () inf ! tu-dresden ! de>
Date:       2003-07-30 15:21:30
[Download RAW message or body]

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 list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic