diff options
author | Jim Meyering <meyering@redhat.com> | 2010-08-18 18:39:53 -0400 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-08-18 18:46:24 -0400 |
commit | d12981ce204e1970e9a30edf069a8345e37c6a9f (patch) | |
tree | 4222af04f567f89d04a92596ce6935b9b17b4d5b /tests/init.sh | |
parent | 01911cf833d84945e19dc39cdfb3878d813063af (diff) | |
download | parted-d12981ce204e1970e9a30edf069a8345e37c6a9f.tar.gz |
build and tests: update bootstrap and init.sh from gnulib
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
Diffstat (limited to 'tests/init.sh')
-rw-r--r-- | tests/init.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/init.sh b/tests/init.sh index 7943526..bc82d69 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -255,9 +255,9 @@ setup_() || fail_ "failed to create temporary directory in $initial_cwd_" cd "$test_dir_" - # These trap statements ensure that the temporary directory, $test_dir_, - # is removed upon exit as well as upon receipt of any of the listed signals. - trap remove_tmp_ 0 + # This trap statement, along with a trap on 0 below, ensure that the + # temporary directory, $test_dir_, is removed upon exit as well as + # upon receipt of any of the listed signals. for sig_ in 1 2 3 13 15; do eval "trap 'Exit $(expr $sig_ + 128)' $sig_" done @@ -385,3 +385,6 @@ test -f "$srcdir/init.cfg" \ && . "$srcdir/init.cfg" setup_ "$@" +# This trap is here, rather than in the setup_ function, because some +# shells run the exit trap at shell function exit, rather than script exit. +trap remove_tmp_ 0 |