diff options
-rw-r--r-- | tests/include.rc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/include.rc b/tests/include.rc index bf480c22bdb..1d084c03357 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -525,6 +525,16 @@ function cleanup() return 0 } +function force_terminate () { + local ret=$?; + >&2 echo -e "\nreceived external"\ + "signal --`kill -l $ret`--, calling 'cleanup' ...\n"; + cleanup; + exit $ret; +} + +trap force_terminate INT TERM HUP + function volinfo_field() { local vol=$1; |