[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/06: file-systems: Have the emergency REPL output to /dev/console.
From: |
guix-commits |
Subject: |
06/06: file-systems: Have the emergency REPL output to /dev/console. |
Date: |
Tue, 18 Dec 2018 10:04:37 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 5de5f8184530fd7e0e88514ae35cb2e9305910c1
Author: Ludovic Courtès <address@hidden>
Date: Tue Dec 18 15:08:19 2018 +0100
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'.
---
gnu/build/file-systems.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index efd744a..e3369d8 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)))
- branch master updated (83d4da1 -> 5de5f81), guix-commits, 2018/12/18
- 06/06: file-systems: Have the emergency REPL output to /dev/console.,
guix-commits <=
- 01/06: ui: Report file names in 'system-error' exceptions from 'execlp'., guix-commits, 2018/12/18
- 03/06: guix system: Clarify the three strategies available., guix-commits, 2018/12/18
- 04/06: doc: Remove stale reference to 'hydra.gnu.org'., guix-commits, 2018/12/18
- 05/06: file-systems: Spawn a REPL only when interaction is possible., guix-commits, 2018/12/18
- 02/06: doc: Fix typo in '.guix-channel' example., guix-commits, 2018/12/18