3 ms·
Just add sd_notify, it's 65 lines of C code plus a couple of includes. I implemented in pure ruby with no problem either. See for yourself: http://cgit.freedesk
by zimbatm 12y ago
Just add sd_notify, it's 65 lines of C code plus a couple of includes. I implemented in pure ruby with no problem either. See for yourself: http://cgit.freedesktop.org/systemd/systemd/tree/src/libsystemd/sd-daemon/sd-daemon.c#n381 http://cgit.freedesktop.org/systemd/systemd/tree/src/libsyst...
My biggest gripe is with socket activation. Systemd doesn't provide any info apart from the file descriptors to the application so binding to port 80 and 443, you have to know the order to add SSL on the right one.
- ieG9ique 12y agothis seems to be a common misunderstanding how apis and protocols work: you cannot just copy-past the internal implementation because that may change, the only thing that is stable is the public documented interface in this case the public and documented interface is sd_notify and it is only available as part of a huge library that every service has to link to their binary it would be nice if systemd authors werent completely ignorant about sensible interface design between software components now that ppl started to depend on random internal behaviour of systemd it is no longer possible to reimplement it in a sensible way: nobody knows which systemd quirk your ruby project depends on
- asdfaoeu 12y ago> this seems to be a common misunderstanding how apis and protocols work: you cannot just copy-past the internal implementation because that may change, the only thing that is stable is the public documented interface It isn't an internal interface. http://www.freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/ http://www.freedesktop.org/wiki/Software/systemd/InterfacePo...
- cthalupa 12y agoSome of the complaints about sd_notify is that it is just an implementation on top of $NOTIFY_SOCKET.... which is completely undocumented. So you have a decently documented and small implementation by Lennart that relies on something that might as well be hoodoo magic unless you've gone through the undocumented code. There's also problems with nscd as pointed out in the comments, but the FSF is insane enough in general that I don't think that's necessarily a problem with systemd and more of an issue with working around the labyrinth of bullshit that is the FSF and their policies.
- BlackFingolfin 12y agoBut $NOTIFY_SOCKET and how to use it is documented, see here: http://0pointer.de/public/systemd-man/sd_notify.html http://0pointer.de/public/systemd-man/sd_notify.html
- cthalupa 12y ago??? That is documentation on sd_notify, which is an implementation that utilizes $NOTIFY_SOCKET. It being documented is not the same thing as $NOTIFY_SOCKET being documented