|author||Mike Gerwitz <email@example.com>||2020-01-21 11:40:13 -0500|
|committer||Mike Gerwitz <firstname.lastname@example.org>||2020-01-21 11:40:14 -0500|
bin/tamed: Fail without explicit DONE
We want to fail e.g. on a JVM crash.
Diffstat (limited to 'bin')
1 files changed, 5 insertions, 0 deletions
@@ -26,6 +26,7 @@ declare -ri EX_STALLED=2 # runner stalled and could not recover
declare -ri EX_NORUN=3 # no available runners
declare -ri EX_DLOCK=4 # failed to get a lock to start tamed
declare -ri EX_BLOCK=5 # failed to get a lock for busy runner check
+declare -ri EX_NODONE=6 # tamed did not provide a DONE with exit code
declare -ri EX_USAGE=64 # incorrect usage; sysexits.h
# maximum amount of time in seconds to wait for runner to ack
@@ -111,6 +112,10 @@ command-runner()
done < "$base/1"
+ # We should have returned as soon as we received DONE. If this was not
+ # provided, then something probably went wrong (e.g. JVM crash).
+ return "$EX_NODONE"