diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-04-14 17:48:47 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-04-25 17:38:57 +0200 |
commit | 4054d76151678edc7c6b77ebdebb9a32d1dc11c9 (patch) | |
tree | e72ad90b5ae27b65be43976180f0127fc74d2f8c /src/systemd | |
parent | 4a75704b166de533cedf8f9fab16ffae77bf2093 (diff) | |
download | systemd-4054d76151678edc7c6b77ebdebb9a32d1dc11c9.tar.gz |
sd-daemon: add sd_pid_notifyf_with_fds()
I guess it was only a question of time until we need to add the final
frontier of notification functions: one that combines the features of
all the others:
1. specifiying a source PID
2. taking a list of fds to send along
3. accepting a format string for the status string
Hence, let's add it.
Diffstat (limited to 'src/systemd')
-rw-r--r-- | src/systemd/sd-daemon.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/systemd/sd-daemon.h b/src/systemd/sd-daemon.h index 6f88cf02fa..a8b40ff1f8 100644 --- a/src/systemd/sd-daemon.h +++ b/src/systemd/sd-daemon.h @@ -291,6 +291,11 @@ int sd_pid_notifyf(pid_t pid, int unset_environment, const char *format, ...) _s int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char *state, const int *fds, unsigned n_fds); /* + Combination of sd_pid_notifyf() and sd_pid_notify_with_fds() +*/ +int sd_pid_notifyf_with_fds(pid_t pid, int unset_environment, const int *fds, size_t n_fds, const char *format, ...) _sd_printf_(5,6); + +/* Returns > 0 if synchronization with systemd succeeded. Returns < 0 on error. Returns 0 if $NOTIFY_SOCKET was not set. Note that the timeout parameter of this function call takes the timeout in µs, and |