]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/systemd/sd-daemon.h
sd-daemon: introduce sd_pid_notify() and sd_pid_notifyf()
authorLennart Poettering <lennart@poettering.net>
Thu, 5 Jun 2014 15:05:18 +0000 (17:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 5 Jun 2014 15:05:18 +0000 (17:05 +0200)
commitbe8f4e9e8eb3b0c34a49c2e80a5c5b7dc6d175f0
tree172fdccc7b7033063ecdb8bbd7e5d395e3a91095
parent03da8f9459b005d5515d2c34152d43bc63f64c79
sd-daemon: introduce sd_pid_notify() and sd_pid_notifyf()

sd_pid_notify() operates like sd_notify(), however operates on a
different PID (for example the parent PID of a process).

Make use of this in systemd-notify, so that message are sent from the
PID specified with --pid= rather than the usually shortlived PID of
systemd-notify itself.

This should increase the likelyhood that PID 1 can identify the cgroup
that the notification message was sent from properly.
src/libsystemd/sd-daemon/sd-daemon.c
src/notify/notify.c
src/shared/util.c
src/systemd/sd-daemon.h