MILESTONE // dependency must start successfully, but once started the dependency becomes soft
};
+enum class stopped_reason_t
+{
+ NORMAL,
+
+ // Start failures:
+ DEPFAILED, // A dependency failed to start
+ FAILED, // failed to start (process terminated)
+ EXECFAILED, // failed to start (couldn't launch process)
+ TIMEDOUT, // timed out when starting
+
+ // Failure after starting:
+ TERMINATED // process terminated
+};
+
/* Service dependency record */
class service_dep
{
uid_t socket_uid = -1; // socket user id or -1
gid_t socket_gid = -1; // socket group id or -1
+ stopped_reason_t stop_reason = stopped_reason_t::NORMAL; // reason why stopped
+
// Data for use by service_set
public:
}
depends_on.clear();
}
+
+ // Why did the service stop?
+ stopped_reason_t get_stop_reason()
+ {
+ return stop_reason;
+ }
};
inline auto extract_prop_queue(service_record *sr) -> decltype(sr->prop_queue_node) &