Re: s6-linux-init and ttys in lxc containers

From: Laurent Bercot <>
Date: Tue, 08 Mar 2022 15:58:04 +0000

>s6-linux-init: warning: unable to ttyname stdout: No such device
>I suspect this is due to the mechanism described on, although I’m not using LXD, only lxc (which does not have a daemon running as root).

  You're right, it's the exact same issue. If /proc/1/fd/1 does not
point to a valid pts in the container, then ttyname() will be unable to
resolve it and you will get that warning message - and you also will be
unable to transmit your controlling terminal to stage 2 (which is not a
problem in your case).

  The only solution, I'm afraid, is to make sure your pseudo-filesystems
are correctly prepared before you launch your container, which you may
not be able to do without root privileges. Docker can do it; if you
were running lxd there would probably be a way to do it as well. But if
you have no use for a controlling terminal, you can forget about all
and just ignore the warning.

Received on Tue Mar 08 2022 - 16:58:04 CET

This archive was generated by hypermail 2.4.0 : Tue Mar 08 2022 - 16:58:34 CET