Subject: Re: bug#23194: Benign error in installation image: "stty: standard input: Input/output error"

From: [email-masked] (Ludovic Courtès)
Date: Mon, 04 Apr 2016 16:50:40 +0200

Chris Marusich <[email-masked]> 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"

These appear to come from the ‘unicode_start’ command, run by the
‘console-font’ services.  ‘unicode_start’ is a shell script in the ‘kbd’
package that does:

  stty iutf8

In a ‘guix system vm gnu/system/install.scm’ VM in current master, I
sometimes get a different message:

  unicode_start skipped on not a tty

The “not a tty” string comes from the ‘tty’ command (Coreutils).  We get
it when:

  ttyname (STDIN_FILENO);

returns NULL; this can happen if ‘tcgetattr’ returns NULL (see ttyname.c
in libc.)

The ‘stty’ error you mention also happens when ‘tcgetattr’ fails and
returns EIO (stty.c in Coreutils):

--8<---------------cut here---------------start------------->8---
    device_name = _("standard input");

  if (tcgetattr (STDIN_FILENO, &mode))
    error (EXIT_FAILURE, errno, "%s", device_name);
--8<---------------cut here---------------end--------------->8---

‘tcgetattr’ is actually an alias for the TCGETS ioctl.  Looking at the
kernel, I don’t see under what circumstances we can get EIO.

That’s all I have for now!

Thanks for your report.
Ludo’.