aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/utils.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-02-15 18:52:44 +0000
committerChristopher Baines <mail@cbaines.net>2021-02-15 18:52:44 +0000
commitb3733bca21de607fd7a70319e66e3ff49996a974 (patch)
tree95a6f290c9bf9715808ac52086962e1bdf2ad6f0 /guix-build-coordinator/utils.scm
parent392e2df9091f69567c77a3063da8ab7368ad521b (diff)
downloadbuild-coordinator-b3733bca21de607fd7a70319e66e3ff49996a974.tar
build-coordinator-b3733bca21de607fd7a70319e66e3ff49996a974.tar.gz
Avoid some threads and locks when running on the hurd
I've see the process hang on the hurd, and I think this might help.
Diffstat (limited to 'guix-build-coordinator/utils.scm')
-rw-r--r--guix-build-coordinator/utils.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm
index 20cf007..e29be18 100644
--- a/guix-build-coordinator/utils.scm
+++ b/guix-build-coordinator/utils.scm
@@ -54,7 +54,9 @@
with-timeout
- get-load-average))
+ get-load-average
+
+ running-on-the-hurd?))
(eval-when (eval load compile)
(begin
@@ -803,3 +805,9 @@ again."
((= period 5) 5min)
((= period 15) 15min))))))
#f))
+
+(define (running-on-the-hurd?)
+ (let ((cached-system #f))
+ (unless cached-system
+ (set! cached-system (utsname:sysname (uname))))
+ (string=? cached-system "GNU")))