#include <systemd/sd-event.h>
sd_event_source_set_destroy_callback()
sd_event_source_get_destroy_callback() returns the current callback for source in the callback parameter.
On success, sd_event_source_set_destroy_callback() returns 0 or a positive integer. On failure, it returns a negative errno-style error code.
sd_event_source_get_destroy_callback() returns positive if the destroy callback function is set, 0 if not. On failure, returns a negative errno-style error code.
Returned errors may indicate the following problems:
-EINVAL
These APIs are implemented as a shared library, which can be compiled and linked to with the libsystemd pkg-config(1) file.
systemd(1), sd-event(3), sd_event_add_io(3), sd_event_add_time(3), sd_event_add_signal(3), sd_event_add_child(3), sd_event_add_inotify(3), sd_event_add_defer(3), sd_event_source_set_userdata(3)