bin/tame (verify-runner): Add missing id param

This was referencing a global $id, which is not the value we are interested
in (and may not exist at all).  Add the missing param.
master
Mike Gerwitz 2021-03-12 09:46:08 -05:00
parent 7325578624
commit 6221ce5fee
1 changed files with 3 additions and 2 deletions

View File

@ -75,7 +75,7 @@ command-runner()
local -r base="$root/$id"
local -ri pid=$( cat "$base/pid" )
verify-runner "$base" "$pid"
verify-runner "$base" "$id" "$pid"
# forward signals to runner so that build is actually halted
# (rather than continuing in background after we die)
@ -239,7 +239,8 @@ mark-available()
verify-runner()
{
local -r base="${1?Missing base}"
local -ri pid="${2?Missing pid}"
local -ri id="${2?Missing id}"
local -ri pid="${3?Missing pid}"
ps "$pid" &>/dev/null || {
echo "error: runner $id ($pid) is offline!" >&2