From b65da435c4f55bf86ca81e9aa914098066846343 Mon Sep 17 00:00:00 2001 From: Matt Wrock Date: Thu, 12 Dec 2024 13:40:06 -0800 Subject: [PATCH] sleep Signed-off-by: Matt Wrock --- components/studio/bin/hab-studio.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/components/studio/bin/hab-studio.sh b/components/studio/bin/hab-studio.sh index 4ef3641c4d..0dfba51ee4 100755 --- a/components/studio/bin/hab-studio.sh +++ b/components/studio/bin/hab-studio.sh @@ -1041,15 +1041,6 @@ chown_certs() { } # **Internal** -# Mimic delay using busy loop -busy_sleep() { - local duration=$1 - local end_time=$(( $(date +%s) + duration )) - while [ "$(date +%s)" -lt "$end_time" ]; do - : # No-op, keeps the loop running - done -} - # **Internal** Unmount mount point if mounted and abort if an unmount is # unsuccessful. # @@ -1082,7 +1073,8 @@ umount_fs() { i=1 while [ "$i" -le "$MAX_RETRIES" ] do - busy_sleep $((RETRY_DELAY * i)) # Delay increases with each retry + echo "$PATH" + sleep $((RETRY_DELAY * i)) # Delay increases with each retry if ! is_fs_mounted "$_mount_point"; then return 0 fi