summaryrefslogtreecommitdiff
path: root/tests/cp/same-file
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-08-21 09:39:59 +0000
committerJim Meyering <jim@meyering.net>2000-08-21 09:39:59 +0000
commit6d622fcb6b1d647564df6aa2e685af9d9a1a1ca2 (patch)
tree4a3ce21bc508bd9380f360526e8247754c5a311a /tests/cp/same-file
parentdfdd08e9431f36647f42c87e01aae3a0b0655642 (diff)
downloadcoreutils-6d622fcb6b1d647564df6aa2e685af9d9a1a1ca2.tar.xz
use better trap
Diffstat (limited to 'tests/cp/same-file')
-rwxr-xr-xtests/cp/same-file4
1 files changed, 3 insertions, 1 deletions
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