summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2014-09-12 10:49:43 -0400
committerBill Peck <bpeck@redhat.com>2014-09-12 10:49:43 -0400
commit54e094e0ba2ac0e6f549433a759c551f28b0b89b (patch)
treeda6e343a6deddb777162046d7c8d7e859d4e40e1
parent4ab498b6ce44e7631442a266d085a66e01823f66 (diff)
downloadtests-54e094e0ba2ac0e6f549433a759c551f28b0b89b.tar.gz
tests-54e094e0ba2ac0e6f549433a759c551f28b0b89b.tar.xz
tests-54e094e0ba2ac0e6f549433a759c551f28b0b89b.zip
Fix return2beaker.sh
-rwxr-xr-xdistribution/reservesys/reservesys.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/distribution/reservesys/reservesys.sh b/distribution/reservesys/reservesys.sh
index 489a78c..24d45bb 100755
--- a/distribution/reservesys/reservesys.sh
+++ b/distribution/reservesys/reservesys.sh
@@ -5,7 +5,12 @@
# If we timeout from either local or external watchdog
# we will have a warn/fail recorded anyway.
#
-trap 'exit 0' 15
+
+cleanup()
+{
+ kill -9 $1
+ exit 0
+}
# Functions
RprtRslt()
@@ -213,8 +218,10 @@ fi
# Run another copy of restraint on a different port
# This makes it easy to develop/debug new tasks.
-restraintd --port 8082
+restraintd --port 8082 &
+pid=$!
+trap "cleanup $pid" 15
# We stay running in restraint..
while (true); do