iopupgrade: Make the watchdog send an alarm only if it fully times out.

This commit is contained in:
Ronny Nilsson 2019-12-04 15:10:48 +01:00
parent 3f124c31f0
commit d8b65da11f

View file

@ -226,8 +226,7 @@ done
# put a timeout on this if it takes longer than 120 seconds we should abort
# and clean up
(
sleep 120 # if 2 minutes pass
kill -ALRM $$ 2>/dev/null # send it a SIGALRM signal
sleep 120 && kill -ALRM $$ 2>/dev/null # send it a SIGALRM signal
)&
TIMEOUT_PID=$!