From 1c0b61eae2cb175e42578bd1b156599264afed0d Mon Sep 17 00:00:00 2001 From: Thomas Oettli Date: Mon, 4 Nov 2024 10:33:56 +0100 Subject: [PATCH] change comment about wait function --- snmpd-oid-daemon.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snmpd-oid-daemon.sh b/snmpd-oid-daemon.sh index 18fbb40..f158c10 100755 --- a/snmpd-oid-daemon.sh +++ b/snmpd-oid-daemon.sh @@ -612,7 +612,8 @@ while :; do else wait $pid &>/dev/null rc=$? - # the wait function in older Bash versions always returns 127 if the sub-proc already exited + # the wait function in older Bash versions prior to 5.1 always returns 127 if + # the sub-process already exited at this point (( rc == 127 )) && rc=0 fi echo "gather: $func (PID $pid, FD $fd) exited with rc = $rc" >&$DEBUGLOG