diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-02-12 12:01:23 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-02-12 12:01:23 -0500 |
commit | cc49a8c9ca40eaf0dce444c3028f88de89f9578f (patch) | |
tree | e5c692dfc3f51e529b1cf9be3503da3965ca1d8b /spawner.sh | |
parent | a6f0d0a38ea52a202252b871cb00e8b5f604d105 (diff) | |
download | docker-buildsys-cc49a8c9ca40eaf0dce444c3028f88de89f9578f.tar.gz |
Improve timeout situation drastically
Diffstat (limited to 'spawner.sh')
-rwxr-xr-x | spawner.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spawner.sh b/spawner.sh new file mode 100755 index 0000000..7fd328b --- /dev/null +++ b/spawner.sh @@ -0,0 +1,9 @@ +#!/bin/bash +limit="${TIMEOUT:-45m}" +echo "This job will automatically terminate after: ${limit}" +timeout -sTERM ${limit} $@ +retval=$? +if [[ ${retval} == 124 ]]; then + echo "Job terminated: ${limit} time limit reached" +fi +exit ${retval} |