diff options
author | Christopher Baines <mail@cbaines.net> | 2021-01-03 12:02:46 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-01-03 12:02:46 +0000 |
commit | 5149e4f322f71d65851c899cc9b8ce4532ca65ee (patch) | |
tree | 669904d5ff5a217a7e94fc2787f59175f8653e43 | |
parent | df9c29f46e21f530ef76938a605fb189d82eab48 (diff) | |
download | build-coordinator-5149e4f322f71d65851c899cc9b8ce4532ca65ee.tar build-coordinator-5149e4f322f71d65851c899cc9b8ce4532ca65ee.tar.gz |
Fix the stdin based status display when running under the shepherd
The current input port is #<input: file 0>, which gives eof when read from, so
detect this and stop trying to read from it.
-rw-r--r-- | guix-build-coordinator/agent.scm | 7 |
1 files 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)) |