From: Jim Meyering Date: Mon, 21 Aug 2000 09:39:59 +0000 (+0000) Subject: use better trap X-Git-Tag: FILEUTILS-4_0z~130 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=6d622fcb6b1d647564df6aa2e685af9d9a1a1ca2;p=thirdparty%2Fcoreutils.git use better trap --- diff --git a/tests/cp/same-file b/tests/cp/same-file index 908fe2e71c..09c535c374 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -15,7 +15,9 @@ VERSION_CONTROL=numbered; export VERSION_CONTROL pwd=`pwd` actual=actual-$$ expected=expected-$$ -trap "cd $pwd; rm -rf $actual $expected dir" 0 1 2 3 15 + +trap 'status=$?; cd $pwd; rm -rf $actual $expected && exit $status' 0 +trap 'exit $?' 1 2 13 15 exec 1> $actual