summaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-12-18 15:08:19 +0100
committerLudovic Courtès <ludo@gnu.org>2018-12-18 16:04:26 +0100
commit5de5f8184530fd7e0e88514ae35cb2e9305910c1 (patch)
tree6e726de1655761441f290f4321b66dae0439ca9a /gnu/build
parent6ea6e1476ff4a18d4b4b864c3065d18ed99c69af (diff)
downloadpatches-5de5f8184530fd7e0e88514ae35cb2e9305910c1.tar
patches-5de5f8184530fd7e0e88514ae35cb2e9305910c1.tar.gz
file-systems: Have the emergency REPL output to /dev/console.
This fixes a bug whereby all emergency REPL output would go to /dev/klog and thus, each line would be prefixed by "[12324.432] shepherd[1]: ". * gnu/build/file-systems.scm (check-file-system): Wrap 'start-repl' call in 'with-output-to-file'.
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/file-systems.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index efd744acc1..e3369d8521 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -541,7 +541,13 @@ were found."
;; Spawn a REPL only if someone would be able to interact with it.
(when (isatty? (current-input-port))
(format (current-error-port) "Spawning Bourne-like REPL.~%")
- (start-repl %bournish-language))))
+
+ ;; 'current-output-port' is typically connected to /dev/klog (in
+ ;; PID 1), but here we want to make sure we talk directly to the
+ ;; user.
+ (with-output-to-file "/dev/console"
+ (lambda ()
+ (start-repl %bournish-language))))))
(format (current-error-port)
"No file system check procedure for ~a; skipping~%"
device)))