sd_event_set_exit_on_idle
systemd
sd_event_set_exit_on_idle
3
sd_event_set_exit_on_idle
sd_event_get_exit_on_idle
Enable event loop exit-on-idle support
#include <systemd/sd-event.h>
int sd_event_set_exit_on_idle
sd_event *event
int b
int sd_event_get_exit_on_idle
sd_event *event
Description
sd_event_set_exit_on_idle() may be used to
enable or disable the exit-on-idle support in the
event loop object specified in the event
parameter. If enabled, the event loop will exit with a zero exit code
there are no more enabled (SD_EVENT_ON, SD_EVENT_ONESHOT),
non-exit, non-post event sources.
sd_event_get_exit_on_idle() may be used to
determine whether exit-on-idle support was previously requested by a
call to sd_event_set_exit_on_idle() with a true
b parameter and successfully enabled.
Return Value
On success, sd_event_set_exit_on_idle() and
sd_event_get_exit_on_idle() return a non-zero positive integer if the exit-on-idle
support was successfully enabled. They return zero if the exit-on-idle support was explicitly disabled
with a false b parameter. On failure, they return a negative errno-style error
code.
Errors
Returned errors may indicate the following problems:
-ECHILD
The event loop has been created in a different process, library or module instance.
-EINVAL
The passed event loop object was invalid.
History
sd_event_set_exit_on_idle() and
sd_event_get_exit_on_idle() were added in version 259.
See Also
systemd1
sd-event3
sd_event_new3
sd_event_add_io3
sd_event_add_time3
sd_event_add_signal3
sd_event_add_child3
sd_event_add_inotify3
sd_event_add_defer3
systemd.service5