diff options
author | Christopher Baines <mail@cbaines.net> | 2022-04-08 10:47:41 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-04-08 10:47:41 +0100 |
commit | 48ec50ab514eb8de8956836e0e2973d0d9317596 (patch) | |
tree | 33ca8342493c41488f25e0d4335080d5b8cca00a | |
parent | f1223225144b866951f13ece7f0583fd826a5705 (diff) | |
download | build-coordinator-48ec50ab514eb8de8956836e0e2973d0d9317596.tar build-coordinator-48ec50ab514eb8de8956836e0e2973d0d9317596.tar.gz |
Simplify with-timeout
-rw-r--r-- | guix-build-coordinator/utils.scm | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index 4eacf37..57bebb2 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -970,22 +970,7 @@ again." (alarm duration) (call-with-values (lambda () - (let try () - (catch 'system-error - (lambda () - body ...) - (lambda args - ;; Before Guile v2.0.9-39-gfe51c7b, the SIGALRM triggers EINTR - ;; because of the bug at - ;; <http://lists.gnu.org/archive/html/guile-devel/2013-06/msg00050.html>. - ;; When that happens, try again. Note: SA_RESTART cannot be - ;; used because of <http://bugs.gnu.org/14640>. - (if (= EINTR (system-error-errno args)) - (begin - ;; Wait a little to avoid bursts. - (usleep (random 3000000 %random-state)) - (try)) - (apply throw args)))))) + body ...) (lambda result (alarm 0) (sigaction SIGALRM SIG_DFL) |