Name

sd-daemon — Reference implementation of APIs for new-style daemons

Synopsis

#include "sd-daemon.h"

Notes

These interfaces are provided by the reference implementation of APIs for new-style daemons and distributed with the systemd package. The algorithms they implement are simple, and can easily be reimplemented in daemons if it is important to support this interface without using the reference implementation. See the respective function man pages for details.

In addition, for details about the algorithms check the liberally licensed reference implementation sources: http://cgit.freedesktop.org/systemd/tree/src/sd-daemon.c resp. http://cgit.freedesktop.org/systemd/tree/src/sd-daemon.h

These APIs are implemented in the reference implementation's drop-in sd-daemon.c and sd-daemon.h files. It is recommended that applications consuming these APIs copy the implementation into their source tree, either verbatim or in excerpts. These interfaces are currently not available in a dynamic library.

The functions directly related to new-style daemons become NOPs when -DDISABLE_SYSTEMD is set during compilation. In addition, if sd-daemon.c is compiled on non-Linux systems they become NOPs.