From: Jim Meyering Date: Tue, 5 Sep 2000 12:15:30 +0000 (+0000) Subject: Redirect stdout to stderr before trying to X-Git-Tag: FILEUTILS-4_0z~31 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=b150de0a99304ca9661193ccf831845c52010b3d;p=thirdparty%2Fcoreutils.git Redirect stdout to stderr before trying to remove the temp directory. Otherwise, the `rm -rf' would get an error because the output file wouldn't be closed and the directory wouldn't be `empty'. --- diff --git a/tests/cp/same-file b/tests/cp/same-file index aeec210228..ccc4f5b6c3 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -14,7 +14,7 @@ VERSION_CONTROL=numbered; export VERSION_CONTROL pwd=`pwd` tmp=same-f-$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $tmp && exit $status' 0 trap 'exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink index 34f9972ff5..ef41e6e52c 100755 --- a/tests/mv/part-symlink +++ b/tests/mv/part-symlink @@ -10,7 +10,7 @@ fi pwd=`pwd` tmp=part-sl.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp $other_partition_tmpdir && exit $status' 0 +trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $tmp $other_partition_tmpdir && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 pwd_tmp=$pwd/$tmp