summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-02-12 12:24:49 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-02-12 12:24:49 -0500
commit7e5eec2af519441606c703f3c8ccd0fcfe63c7ff (patch)
treeeefe0aca9146ed1f66e27a98b62d3d9d3c29bd38
parentcc49a8c9ca40eaf0dce444c3028f88de89f9578f (diff)
downloaddocker-buildsys-7e5eec2af519441606c703f3c8ccd0fcfe63c7ff.tar.gz
KILL instead of TERM
-rwxr-xr-xspawner.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/spawner.sh b/spawner.sh
index 7fd328b..10553d7 100755
--- a/spawner.sh
+++ b/spawner.sh
@@ -1,9 +1,9 @@
#!/bin/bash
limit="${TIMEOUT:-45m}"
echo "This job will automatically terminate after: ${limit}"
-timeout -sTERM ${limit} $@
+timeout -sKILL ${limit} $@
retval=$?
-if [[ ${retval} == 124 ]]; then
+if [[ ${retval} == 124 ]] || [[ ${retval} == 137 ]]; then
echo "Job terminated: ${limit} time limit reached"
fi
exit ${retval}