change log messages
This commit is contained in:
@@ -578,16 +578,16 @@ while :; do
|
|||||||
if (( fd == -1 )); then
|
if (( fd == -1 )); then
|
||||||
exec {data}< <($func </dev/null)
|
exec {data}< <($func </dev/null)
|
||||||
pid=$!
|
pid=$!
|
||||||
echo "gathering: executed $func (PID $pid, FD $data)" >&$DEBUGLOG
|
echo "gather: executed $func (PID $pid, FD $data)" >&$DEBUGLOG
|
||||||
fdtable[$func]=$data
|
fdtable[$func]=$data
|
||||||
pidtable[$func]=$pid
|
pidtable[$func]=$pid
|
||||||
else
|
else
|
||||||
pid=${pidtable[$func]}
|
pid=${pidtable[$func]}
|
||||||
echo "gathering: skip executing $func, it is still running (PID $pid, FD $fd)" >&2
|
echo "gather: skip executing $func, it is still running (PID $pid, FD $fd)" >&2
|
||||||
fi
|
fi
|
||||||
((next_update+=delay))
|
((next_update+=delay))
|
||||||
timetable[$func]=$next_update
|
timetable[$func]=$next_update
|
||||||
echo "gathering: scheduled next execution of $func at $(date -d @$next_update)" >&$DEBUGLOG
|
echo "gathe: scheduled next execution of $func at $(date -d @$next_update)" >&$DEBUGLOG
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -604,7 +604,7 @@ while :; do
|
|||||||
fdtable[$func]=-1
|
fdtable[$func]=-1
|
||||||
pid=${pidtable[$func]}
|
pid=${pidtable[$func]}
|
||||||
if (( rc == 124 )); then
|
if (( rc == 124 )); then
|
||||||
echo "gathering: timeout receiving data from $func (PID $pid, FD $fd), killing process" >&2
|
echo "gather: timeout receiving data from $func (PID $pid, FD $fd), killing process" >&2
|
||||||
kill -SIGTERM $pid
|
kill -SIGTERM $pid
|
||||||
sleep 1
|
sleep 1
|
||||||
ps -p $pid >/dev/null && kill -SIGKILL $pid
|
ps -p $pid >/dev/null && kill -SIGKILL $pid
|
||||||
@@ -613,9 +613,9 @@ while :; do
|
|||||||
wait $pid
|
wait $pid
|
||||||
rc=$?
|
rc=$?
|
||||||
fi
|
fi
|
||||||
echo "gathering: $func (PID $pid, FD $fd) exited with rc = $rc" >&$DEBUGLOG
|
echo "gather: $func (PID $pid, FD $fd) exited with rc = $rc" >&$DEBUGLOG
|
||||||
if (( rc == 0 )) && [ -n "$data" ]; then
|
if (( rc == 0 )) && [ -n "$data" ]; then
|
||||||
echo "gathering: sending data to main" >&$DEBUGLOG
|
echo "gather: sending data to cache" >&$DEBUGLOG
|
||||||
echo "$data" 1>&$DATAIN
|
echo "$data" 1>&$DATAIN
|
||||||
echo "ENDOFDATA" >&$DATAIN
|
echo "ENDOFDATA" >&$DATAIN
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user