nosh: convert-systemd-units' treatment of Standardxxx=tty directives

From: Guillermo <gdiazhartusch_at_gmail.com>
Date: Sat, 21 May 2016 16:14:43 -0300

Hello,

So, the convert-systemd-units tool recognizes the systemd
'StandardInput=tty' unit file directive, and translates it to a
vc-get-tty + open-controlling-tty sequence in the 'run' file of the
generated bundle directory. Which does more than just redirecting
stdin to the appropriate character device file. Out of curiosity, why
is the controlling terminal allocation done there? Is it just to
respect systemd's behaviour, or is there a more fundamental reason?

<https://www.freedesktop.org/software/systemd/man/systemd.exec.html>

I also note that, unlike the StandardInput case, 'StandardOutput=tty'
and 'StandardError=tty' directives are not supported by the conversion
tool and ignored with a warning, when it appears that in the absence
of a 'StandardInput=tty' directive they could just be translated to an
fdredir (or fdredir + fdmove --copy sequence) naming the device file.
No controlling terminal required in this case according to the systemd
documentation. And when 'StandardInput=tty' is present,
'StandardOutput=tty' (or 'inherit') and 'StandardError=tty' (or
'inherit') look already covered to me by the open-controlling-tty
invocation, since that utility redirects stdout and stderr to the
terminal, along with stdin. So, again out of curiosity, is there a
reason for ignoring these uses of StandardOutput and StandardError?

Thanks,

G.
Received on Sat May 21 2016 - 19:14:43 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC