Bug#1139273: systemd: wrong execution environment for /etc/rc.local
Ansgar 🙀
ansgar at debian.org
Mon Jun 8 07:33:15 BST 2026
Hi,
On Mon, 2026-06-08 at 02:27 +0200, Thorsten Glaser wrote:
> Attempting to access stderr in /etc/local fails on systemd
> but works on other init systems.
>
> Someone on Fedi tells me that is because systemd expects
> services to treat fd#2 as a socket.
>
> However, /etc/rc.local is a POSIX shell script, and POSIX
> is pretty clear on std{in,out,err}.
Which clause do you refer to?
Using sockets to back std{in,out,err} seems pretty common, for example
the "inetd" superserver does so as do CGI scripts and many other
things. It would be strange if POSIX was to forbid all of these?
Ansgar
More information about the Pkg-systemd-maintainers
mailing list