]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Redirect stdout to stderr before trying to
authorJim Meyering <jim@meyering.net>
Tue, 5 Sep 2000 12:15:30 +0000 (12:15 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 5 Sep 2000 12:15:30 +0000 (12:15 +0000)
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'.

tests/cp/same-file
tests/mv/part-symlink

index aeec21022809c8e45c112318bae0a85cd3c6d49a..ccc4f5b6c37ecce23898f577597bfd95f47874c3 100755 (executable)
@@ -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
index 34f9972ff5e74c94b7cf12a3520f41496670ab75..ef41e6e52c8106bdf2d8e1fa963e5e7d90ece806 100755 (executable)
@@ -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