From: Michael Tremer Date: Tue, 9 Jun 2026 18:37:01 +0000 (+0000) Subject: make.sh: Remove the timer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31d52aabde211aabb3ce376b87a0b397b3abe270;p=ipfire-2.x.git make.sh: Remove the timer This seems to trigger a bug bash which causes the build process to hand for forever. Since most packages build fast enough, we will simply remove it and only print the total build time. Signed-off-by: Michael Tremer --- diff --git a/make.sh b/make.sh index 2d6901a37..e7c72e62d 100755 --- a/make.sh +++ b/make.sh @@ -265,54 +265,6 @@ print_build_summary() { print_status DONE } -# Launches a timer process as a co-process -launch_timer() { - # Do nothing if the timer is already running - if [ -n "${TIMER_PID}" ]; then - return 0 - fi - - # Don't launch the timer when we are not on a terminal - if ! is_terminal; then - return 0 - fi - - # Launch the co-process - coproc TIMER { "${0}" "__timer" "$$"; } - - # Register the signal handlers - trap "__timer_event" SIGUSR1 - trap "terminate_timer" EXIT -} - -# Terminates a previously launched timer -terminate_timer() { - if [ -n "${TIMER_PID}" ]; then - kill -TERM "${TIMER_PID}" - fi -} - -# The timer main loop -__timer() { - local pid="${1}" - - # Send SIGUSR1 to the main process once a second - # If the parent process has gone away, we will terminate. - while sleep 1; do - if ! kill -USR1 "${pid}" &>/dev/null; then - break - fi - done - - return 0 -} - -# Called when the timer triggers -# This function does nothing, but is needed interrupt the wait call -__timer_event() { - return 0 -} - exiterror() { # Dump logfile if [ -n "${LOGFILE}" ] && [ -e "${LOGFILE}" ]; then @@ -574,7 +526,6 @@ execute() { local chroot="false" local command=() local interactive="false" - local timer local network="false" # Collect environment variables @@ -734,10 +685,6 @@ execute() { ) ;; - --timer=*) - timer="${1#--timer=}" - ;; - -*) echo "Unknown argument: ${1}" >&2 return 2 @@ -850,11 +797,6 @@ execute() { ;; false) - # Launch the timer if needed - if [ -n "${timer}" ]; then - launch_timer - fi - # Dispatch the command to the background { "${execute[@]}" >> "${LOGFILE}" 2>&1