Chris Marusich <[email protected]> skribis:

> In the installation image for GuixSD v0.10.0, I get some I/O errors on
> the terminal just before/during/after the MOTD is displayed:
>
> "stty: standard input: Input/output error"

With a patch like this, the issue vanishes:

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index b168543..aa34aa8 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -482,6 +482,7 @@ strings or string-valued gexps."
       (let ((pid (primitive-fork)))
         (case pid
           ((0)
+           (sleep 1)
            (close-fdes 0)
            (dup2 (open-fdes #$tty O_RDONLY) 0)
            (close-fdes 1)
This hints at a race condition.

I *think* that the problem is that at the time the ‘console-font-X’
service starts and invokes ‘unicode_start’, it may be that mingetty
hasn’t opened the tty yet.

Indeed, the ‘term-ttyX’ services are considered started as soon as
mingetty is running, but there’s a chance that it’s running and has not
opened the tty yet.

I think we should use another implementation that doesn’t have this
problem (agetty?).  Given that mingetty.c is 400 lines, we might as well
do it in Scheme.

Ludo’.

Reply via email to