Module systemd::daemon[][src]

Structs

Represents the result returned by the socket dameon’s sd_listen_fds

Provides an iterable range over the passed file descriptors.

Enums

Options for checking whether a socket is in listening mode

Constants

D-Bus-style error code in case of failure

Errno-style error code in case of failure

Extend the timeout for the current state.

Name the group of file descriptors sent to the service manager.

Store file descriptors in the service manager.

Remove file descriptors from the service manager store.

Main PID of the daemon, in case systemd didn’t fork it itself

Tells systemd whether daemon startup is finished

Tells systemd the daemon is reloading its configuration

Single-line status string describing daemon state

Tells systemd the daemon is stopping

Update the watchdog timestamp (set to 1). Daemon should do this regularly, if using this feature.

Reset the watchdog timeout during runtime.

Functions

Returns true if the system was booted with systemd.

Identifies whether the passed file descriptor is a FIFO. If a path is supplied, the file descriptor must also match the path.

Identifies whether the passed file descriptor is a POSIX message queue. If a path is supplied, it will also verify the name.

Identifies whether the passed file descriptor is a socket. If family and type are supplied, they must match as well. See Listening for listening check parameters.

Identifies whether the passed file descriptor is an Internet socket. If family, type, and/or port are supplied, they must match as well. See Listening for listening check parameters.

Identifies whether the passed file descriptor is an AF_UNIX socket. If type are supplied, it must match as well. For normal sockets, leave the path set to None; otherwise, pass in the full socket path. See Listening for listening check parameters.

Identifies whether the passed file descriptor is a special character device. If a path is supplied, the file descriptor must also match the path.

Returns a struct that can iterate over the passed file descriptors. Removes the $LISTEN_FDS and $LISTEN_PID file descriptors from the environment if unset_environment is true

Notifies systemd that daemon state has changed. state is made up of a set of key-value pairs. See sd-daemon.h for details. Some of the most common keys are defined as STATE_* constants in this module. Returns true if systemd was contacted successfully.

Similar to notify(), but this sends the message on behalf of the supplied PID, if possible.

Similar to pid_notify(), but this also sends file descriptors to the store.

Returns a timeout in microseconds before which the watchdog expects a response from the process. If 0, the watchdog is disabled.