Skip to content

systemd-style readiness notification not compatible with sd_notify? #440

@aanderse

Description

@aanderse

the intention of the NOTIFY_SOCKET environment variable is to point to a communication socket the service can use to send a message back to the service manager - both systemd and finit implement this ✔

sd_notify doesn't work if NOTIFY_SOCKET is a string representation of an integer... i think in our case it should be a path

https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html#Notes

These functions send a single datagram with the state string as payload to the socket referenced in the $NOTIFY_SOCKET environment variable. If the first character of $NOTIFY_SOCKET is "/" or "@", the string is understood as an AF_UNIX or Linux abstract namespace socket (respectively), and in both cases the datagram is accompanied by the process credentials of the sending service, using SCM_CREDENTIALS.

details here, here, and here, if needed...

i believe finit should adjust at least the following code, but i'm not exactly clear on the details:
https://github.com/troglobit/finit/blob/d318aa00c34ed713a72912e547c46531f4943a70/src/service.c#L732-L733

any advice is greatly appreciated 🙇‍♂

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions