fix only wait for sub-procs on bash versions 5.1 or above
This commit is contained in:
@@ -610,8 +610,12 @@ while :; do
|
||||
ps -p $pid >/dev/null && kill -SIGKILL $pid
|
||||
rc=137
|
||||
else
|
||||
if (( ${BASH_VERSINFO[0]} >= 5 )) && (( ${BASH_VERSINFO[1]} >= 1 )); then
|
||||
wait $pid
|
||||
rc=$?
|
||||
else
|
||||
rc=0
|
||||
fi
|
||||
fi
|
||||
echo "gather: $func (PID $pid, FD $fd) exited with rc = $rc" >&$DEBUGLOG
|
||||
if (( rc == 0 )) && [ -n "$data" ]; then
|
||||
|
||||
Reference in New Issue
Block a user