sd-daemon.h revision 8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0e
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering This file is part of systemd.
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering Copyright 2013 Lennart Poettering
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering systemd is free software; you can redistribute it and/or modify it
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering under the terms of the GNU Lesser General Public License as published by
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering the Free Software Foundation; either version 2.1 of the License, or
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering (at your option) any later version.
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering systemd is distributed in the hope that it will be useful, but
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering Lesser General Public License for more details.
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering You should have received a copy of the GNU Lesser General Public License
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek The following functionality is provided:
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek - Support for logging with log levels on stderr
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek - File descriptor passing for socket-based activation
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek - Daemon startup and status notification
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek - Detection of systemd boots
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd-daemon(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Log levels for usage on stderr:
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek fprintf(stderr, SD_NOTICE "Hello World!\n");
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek This is similar to printk() usage in the kernel.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek#define SD_EMERG "<0>" /* system is unusable */
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek#define SD_ALERT "<1>" /* action must be taken immediately */
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek#define SD_CRIT "<2>" /* critical conditions */
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek#define SD_ERR "<3>" /* error conditions */
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek#define SD_WARNING "<4>" /* warning conditions */
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek#define SD_NOTICE "<5>" /* normal but significant condition */
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek#define SD_INFO "<6>" /* informational */
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek#define SD_DEBUG "<7>" /* debug-level messages */
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek/* The first passed file descriptor is fd 3 */
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Returns how many file descriptors have been passed, or a negative
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek errno code on failure. Optionally, removes the $LISTEN_FDS and
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek $LISTEN_PID file descriptors from the environment (recommended, but
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek problematic in threaded environments). If r is the return value of
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek this function you'll find the file descriptors passed as fds
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek SD_LISTEN_FDS_START to SD_LISTEN_FDS_START+r-1. Returns a negative
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek errno style error code on failure. This function call ensures that
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek the FD_CLOEXEC flag is set for the passed file descriptors, to make
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek sure they are not passed on to child processes. If FD_CLOEXEC shall
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek not be set, the caller needs to unset it after this call for all file
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek descriptors that are used.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_listen_fds(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_listen_fds(int unset_environment);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_listen_fds_with_names(int unset_environment, char ***names);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Helper call for identifying a passed file descriptor. Returns 1 if
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek the file descriptor is a FIFO in the file system stored under the
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek specified path, 0 otherwise. If path is NULL a path name check will
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek not be done and the call only verifies if the file descriptor
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek refers to a FIFO. Returns a negative errno style error code on
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_is_fifo(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_is_fifo(int fd, const char *path);
3ba3a79df4ae094d1008c04a9af8d1ff970124c4Zbigniew Jędrzejewski-Szmek Helper call for identifying a passed file descriptor. Returns 1 if
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek the file descriptor is a special character device on the file
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek system stored under the specified path, 0 otherwise.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek If path is NULL a path name check will not be done and the call
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek only verifies if the file descriptor refers to a special character.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Returns a negative errno style error code on failure.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_is_special(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_is_special(int fd, const char *path);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Helper call for identifying a passed file descriptor. Returns 1 if
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek the file descriptor is a socket of the specified family (AF_INET,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek ...) and type (SOCK_DGRAM, SOCK_STREAM, ...), 0 otherwise. If
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek family is 0 a socket family check will not be done. If type is 0 a
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek socket type check will not be done and the call only verifies if
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek the file descriptor refers to a socket. If listening is > 0 it is
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek verified that the socket is in listening mode. (i.e. listen() has
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek been called) If listening is == 0 it is verified that the socket is
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek not in listening mode. If listening is < 0 no listening mode check
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek is done. Returns a negative errno style error code on failure.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_is_socket(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_is_socket(int fd, int family, int type, int listening);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Helper call for identifying a passed file descriptor. Returns 1 if
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek the file descriptor is an Internet socket, of the specified family
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek (either AF_INET or AF_INET6) and the specified type (SOCK_DGRAM,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek SOCK_STREAM, ...), 0 otherwise. If version is 0 a protocol version
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek check is not done. If type is 0 a socket type check will not be
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek done. If port is 0 a socket port check will not be done. The
3ba3a79df4ae094d1008c04a9af8d1ff970124c4Zbigniew Jędrzejewski-Szmek listening flag is used the same way as in sd_is_socket(). Returns a
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek negative errno style error code on failure.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_is_socket_inet(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Helper call for identifying a passed file descriptor. Returns 1 if
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek the file descriptor is an AF_UNIX socket of the specified type
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek (SOCK_DGRAM, SOCK_STREAM, ...) and path, 0 otherwise. If type is 0
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek a socket type check will not be done. If path is NULL a socket path
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek check will not be done. For normal AF_UNIX sockets set length to
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek 0. For abstract namespace sockets set length to the length of the
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek socket name (including the initial 0 byte), and pass the full
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek socket path in path (including the initial 0 byte). The listening
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek flag is used the same way as in sd_is_socket(). Returns a negative
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek errno style error code on failure.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_is_socket_unix(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Helper call for identifying a passed file descriptor. Returns 1 if
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek the file descriptor is a POSIX Message Queue of the specified name,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek 0 otherwise. If path is NULL a message queue name check is not
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek done. Returns a negative errno style error code on failure.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_is_mq(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_is_mq(int fd, const char *path);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Informs systemd about changed daemon state. This takes a number of
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek newline separated environment-style variable assignments in a
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek string. The following variables are known:
3ba3a79df4ae094d1008c04a9af8d1ff970124c4Zbigniew Jędrzejewski-Szmek READY=1 Tells systemd that daemon startup is finished (only
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek relevant for services of Type=notify). The passed
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek argument is a boolean "1" or "0". Since there is
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek little value in signaling non-readiness the only
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek value daemons should send is "READY=1".
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek STATUS=... Passes a single-line status string back to systemd
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek that describes the daemon state. This is free-form
3ba3a79df4ae094d1008c04a9af8d1ff970124c4Zbigniew Jędrzejewski-Szmek and can be used for various purposes: general state
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek feedback, fsck-like programs could pass completion
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek percentages and failing programs could pass a human
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek readable error message. Example: "STATUS=Completed
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek 66% of file system check..."
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek ERRNO=... If a daemon fails, the errno-style error code,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek formatted as string. Example: "ERRNO=2" for ENOENT.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek BUSERROR=... If a daemon fails, the D-Bus error-style error
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek code. Example: "BUSERROR=org.freedesktop.DBus.Error.TimedOut"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek MAINPID=... The main pid of a daemon, in case systemd did not
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek fork off the process itself. Example: "MAINPID=4711"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek WATCHDOG=1 Tells systemd to update the watchdog timestamp.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Services using this feature should do this in
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek regular intervals. A watchdog framework can use the
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek timestamps to detect failed services. Also see
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek sd_watchdog_enabled() below.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek FDSTORE=1 Store the file descriptors passed along with the
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek message in the per-service file descriptor store,
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek and pass them to the main process again on next
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek invocation. This variable is only supported with
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek sd_pid_notify_with_fds().
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Daemons can choose to send additional variables. However, it is
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek recommended to prefix variable names not listed above with X_.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Returns a negative errno-style error code on failure. Returns > 0
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek if systemd could be notified, 0 if it couldn't possibly because
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek systemd is not running.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Example: When a daemon finished starting up, it could issue this
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek call to notify systemd about it:
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek sd_notify(0, "READY=1");
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_notifyf() for more complete examples.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_notify(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_notify(int unset_environment, const char *state);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Similar to sd_notify() but takes a format string.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Example 1: A daemon could send the following after initialization:
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek sd_notifyf(0, "READY=1\n"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek "STATUS=Processing requests...\n"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek (unsigned long) getpid());
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Example 2: A daemon could send the following shortly before
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek exiting, on failure:
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek sd_notifyf(0, "STATUS=Failed to start up: %s\n"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek strerror(errno),
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek See sd_notifyf(3) for more information.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_(2,3);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Similar to sd_notify(), but send the message on behalf of another
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek process, if the appropriate permissions are available.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmekint sd_pid_notify(pid_t pid, int unset_environment, const char *state);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Similar to sd_notifyf(), but send the message on behalf of another
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek process, if the appropriate permissions are available.
3ba3a79df4ae094d1008c04a9af8d1ff970124c4Zbigniew Jędrzejewski-Szmekint sd_pid_notifyf(pid_t pid, int unset_environment, const char *format, ...) _sd_printf_(3,4);
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek Similar to sd_pid_notify(), but also passes the specified fd array
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek to the service manager for storage. This is particularly useful for
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek FDSTORE=1 messages.
30f10abf42f9e4d251a0b45b07812aafdef6be7cLennart Poetteringint sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char *state, const int *fds, unsigned n_fds);
int sd_booted(void);