summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-daemon
AgeCommit message (Collapse)Author
2015-09-09sd_pid_notify_with_fds: fix computing msg_controllenMaciej Wereski
CMSG_SPACE(0) may return value other than 0. This caused sendmsg to fail with EINVAL, when have_pid or n_fds was 0.
2015-08-07sd-daemon: return EBADF for invalid fd numbersZbigniew Jędrzejewski-Szmek
This matches what open(2) and other system functions do.
2015-03-13sd-daemon: simplify sd_pid_notify_with_fdsZbigniew Jędrzejewski-Szmek
Coverity was complaining that CMSG_NXTHDR is used without checking the return value. In this case it cannot fail, but it is a good excuse to simplify the function a bit. CID #1261726.
2015-03-02sd-daemon: replace VLA with alloca(), to make llvm happyLennart Poettering
https://bugs.freedesktop.org/show_bug.cgi?id=89379
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-01-06core: add new logic for services to store file descriptors in PID 1Lennart Poettering
With this change it is possible to send file descriptors to PID 1, via sd_pid_notify_with_fds() which PID 1 will store individually for each service, and pass via the usual fd passing logic on next invocation. This is useful for enable daemon reload schemes where daemons serialize their state to /run, push their fds into PID 1 and terminate, restoring their state on next start from the data in /run and passed in from PID 1. The fds are kept by PID 1 as long as no POLLHUP or POLLERR is seen on them, and the service they belong to are either not dead or failed, or have a job queued.
2014-10-23sd-daemon,man: ignore missing $WATCHDOG_PIDZbigniew Jędrzejewski-Szmek
Systemd 209 started setting $WATCHDOG_PID, and sd-daemon watch was modified to check for this variable. This means that sd_watchdog_enabled() stopped working with previous versions of systemd. But sd-event is a public library and API and we must keep it working even when a program compiled with a newer version of the libary is used on a system running an older version of the manager. getenv() and unsetenv() are fairly expensive calls, so optimize sd_watchdog_enabled() by not calling them when unnecessary. man: centralize the description of $WATCHDOG_PID and $WATCHDOG_USEC in the sd_watchdog_enabled manpage. It is better not to repeat the same stuff in two places.
2014-07-10libsystemd: make use of our common sockaddr_union everywhereLennart Poettering
2014-06-05sd-daemon: introduce sd_pid_notify() and sd_pid_notifyf()Lennart Poettering
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.
2014-04-13build-sys: add Makefile symlinkLennart Poettering
2014-03-24sd-daemon: fix incorrect variable accessLennart Poettering
2014-02-19build-sys: merge libsystemd-daemon into libsystemdKay Sievers