Job control is disabled prior to setting up the auto-install timeout. It
is then re-disabled when the timer has been started.
The second set +m should be set -m or be removed.
# Stop monitoring background processes to avoid printing
# job completion notices in interactive shell mode. This
# doesn't stop the "[1] <pid>" on starting a job though;
# that's why re redirect stdout and stderr temporarily.
set +m
exec 3<&1 4<&2 >/dev/null 2>&1
(sleep 5; kill $$) &
timer_pid=$!
exec 1<&3 2<&4 3<&- 4<&-
set +m
Matthew
No comments:
Post a Comment