From 6d622fcb6b1d647564df6aa2e685af9d9a1a1ca2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 21 Aug 2000 09:39:59 +0000 Subject: use better trap --- tests/cp/same-file | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/cp/same-file') diff --git a/tests/cp/same-file b/tests/cp/same-file index 908fe2e71..09c535c37 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 -- cgit v1.2.3-70-g09d2