From 5149e4f322f71d65851c899cc9b8ce4532ca65ee Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 3 Jan 2021 12:02:46 +0000 Subject: Fix the stdin based status display when running under the shepherd The current input port is #, which gives eof when read from, so detect this and stop trying to read from it. --- guix-build-coordinator/agent.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index 1f08dd0..244aa8a 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -203,9 +203,10 @@ (call-with-new-thread (lambda () - (while #t - (peek "LINE" (get-line (peek "INPUT" (current-input-port)))) - (display-info)))) + (let loop ((line (get-line (current-input-port)))) + (unless (eof-object? line) + (display-info) + (loop (get-line (current-input-port))))))) (while #t (let ((current-threads (count-threads)) -- cgit v1.2.3