Sujet : Re: Faking a TTY on a pipe/socketpair
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.programmerDate : 12. Dec 2024, 23:31:50
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjfo8l$2vfl9$3@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Pan/0.161 (Chasiv Yar; )
On Thu, 12 Dec 2024 08:39:07 -0000 (UTC), Muttley wrote:
On Wed, 11 Dec 2024 22:26:56 -0000 (UTC)
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>
On Wed, 11 Dec 2024 08:33:29 -0000 (UTC), Muttley wrote:
>
It doesn't need to , it can just spawn off a script or some other
program which does that which is entirely inline with the unix
philosophy.
>
Which is where the trouble starts.
The trouble is with any support scripts, not with init. I've written a
number of init scripts with a lot of surrounding logic.
I’m sure you have. Which means you are familiar with the wholesale copying
and pasting of boilerplate from one script to the next. “What does this
bit do?” “Don’t bother thinking too hard, just stick it in, just in case.”
God knows how I'd do that with systemd ...
Figure out what the directives do (they’re all documented), and which
settings will achieve the result you want. Most of the time, your service
file will be very simple and very short, since all the common cases are
already covered.
“Simple things should be simple, and complex things should be possible.”
-- Alan Kay
He was talking about GUI design, but the same applies to systemd. And to a
lot of other popular *nix software, while we’re at it.
Poettering understands that services don’t just to be started, they al
so need to be managed and shut down cleanly.
Poettering created the wrong solution to the wrong problem.
Lots of sysadmins, and distro maintainers, and developers of service apps,
disagree.
Think of how simple it is to log error messages now: systemd automatically
captures stderr, and shows it in your service status and in the journal.