Hi, I am using sd_notify_pid_with_fds and subsequently sd_notify_fds to store and receive fds from systemd.
Systemd differentiates between systemctl restart <service> -> Where it stops and starts the service, but maintains the fd stored above whereas if I do systemctl stop <service> and then start, the fds are cleaned out. This works well for me, but my question is that apart from the fds, the service also stores local state and tries to restore them on start, and i need the same logic for that data also. i.e. if the service is being restarted than it stores that data otherwise it deletes and flsuhes them out. So my question is, is there any way for the service to know when it is being stopped that it is done for a restart versus stop command? Without that it seems difficult for the service to make the determination to maintain/restore state or flush/init state? Thanks Jana
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
