be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa#ifndef SERVICE_MONITOR_H
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa#define SERVICE_MONITOR_H
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa/* Start listening and monitoring services. */
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksavoid services_monitor_start(struct service_list *service_list);
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa/* Stop services. */
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksavoid services_monitor_stop(struct service_list *service_list, bool wait);
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa/* Call after SIGCHLD has been detected */
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksavoid services_monitor_reap_children(void);
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksavoid service_monitor_stop(struct service *service);
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksavoid service_monitor_stop_close(struct service *service);
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksavoid service_monitor_listen_start(struct service *service);
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksavoid service_monitor_listen_stop(struct service *service);
a3ceba97332fbfa26eb378863f19bf80b808f662Eugen Kuksa
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa#endif
be16f35e063c5c6d4fa08018600d206322bc0c19Eugen Kuksa