Elektrine lite

← Feed

@ska@social.treehouse.systems

Post #1103738

2026-04-09 16:13 UTC

@mia@shrimptest.0x0.st It does. (getsockopt() with SO_PEERCRED, and you get the uid, gid and pid of the client.) But that's not useful here, because what systemd wants is a mechanism that's restricted to one unit; neither uid nor gid can be used for it, and pid isn't a good identifier since the notifier isn't necessarily the main process in the unit. There's an easy way to provide a communication channel to the unit only: the supervisor creates a pipe beforehand and passes the writing end to the unit. That's what s6 does. But of course, that would be way too simple for systemd, so here we are.

Replies (2)

  • @navi@social.vlhl.dev 2026-04-09 16:14

    @ska @mia > But of course, that would be way too simple for systemd, so here we are. even if they wanted socket for complex things, `socketpair` exists, pass a pre-opened socket in NOTIFY_SOCKET instead of a path...

    Open ##1103739

  • @resuna@ohai.social 2026-04-09 20:17

    @ska@social.treehouse.systems @mia@shrimptest.0x0.st Not generally a fan of s6 but it does get a lot of stuff right.

    Open ##2270209