From: Jim Meyering Date: Sat, 4 Dec 1999 17:33:49 +0000 (+0000) Subject: (trap): Be careful to close $actual before X-Git-Tag: FILEUTILS-4_0k~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f05badd2305a8c1c1bc4c1e89109525dd0da8bb8;p=thirdparty%2Fcoreutils.git (trap): Be careful to close $actual before removing the containing directory. Otherwise, on some systems rmdir fails to remove the containing directory. --- diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup index 3ae81764d0..b861248c8c 100755 --- a/tests/cp/cp-mv-backup +++ b/tests/cp/cp-mv-backup @@ -15,7 +15,9 @@ pwd=`pwd` dir=cpmvbak-$$ actual=$dir/actual expected=$dir/expected -trap "cd $pwd; rm -rf $dir" 0 1 2 3 15 + +# Be careful to close $actual before removing the containing directory. +trap "cd $pwd; exec 1<&-; rm -rf $dir" 0 1 2 3 15 mkdir $dir unset VERSION_CONTROL SIMPLE_BACKUP_SUFFIX