summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index a5d1ebd84b..6b786d1bb1 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2734,6 +2734,17 @@ int service_set_socket_fd(Service *s, int fd, Socket *sock) {
return 0;
}
+static void service_reset_maintenance(Unit *u) {
+ Service *s = SERVICE(u);
+
+ assert(s);
+
+ if (s->state == SERVICE_MAINTENANCE)
+ service_set_state(s, SERVICE_DEAD);
+
+ s->failure = false;
+}
+
static const char* const service_state_table[_SERVICE_STATE_MAX] = {
[SERVICE_DEAD] = "dead",
[SERVICE_START_PRE] = "start-pre",
@@ -2821,6 +2832,8 @@ const UnitVTable service_vtable = {
.sigchld_event = service_sigchld_event,
.timer_event = service_timer_event,
+ .reset_maintenance = service_reset_maintenance,
+
.cgroup_notify_empty = service_cgroup_notify_event,
.notify_message = service_notify_message,