core: hook up service unit type with the new clean operation

The implementation is pretty straight-foward: when we get a request to
clean some type of resources we fork off a process doing that, and while
it is running we are in the "cleaning" state.
This commit is contained in:
Lennart Poettering
2019-07-11 12:18:51 +02:00
parent 380dc8b0a2
commit 4c2f584230
7 changed files with 183 additions and 9 deletions
+1
View File
@@ -178,6 +178,7 @@ static const char* const service_state_table[_SERVICE_STATE_MAX] = {
[SERVICE_FINAL_SIGKILL] = "final-sigkill",
[SERVICE_FAILED] = "failed",
[SERVICE_AUTO_RESTART] = "auto-restart",
[SERVICE_CLEANING] = "cleaning",
};
DEFINE_STRING_TABLE_LOOKUP(service_state, ServiceState);
+1
View File
@@ -117,6 +117,7 @@ typedef enum ServiceState {
SERVICE_FINAL_SIGKILL,
SERVICE_FAILED,
SERVICE_AUTO_RESTART,
SERVICE_CLEANING,
_SERVICE_STATE_MAX,
_SERVICE_STATE_INVALID = -1
} ServiceState;