chiark / gitweb /
core: add new logic for services to store file descriptors in PID 1
authorLennart Poettering <lennart@poettering.net>
Mon, 5 Jan 2015 23:26:25 +0000 (00:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Jan 2015 02:16:39 +0000 (03:16 +0100)
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.


No differences found