summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-11-13 17:14:07 +0100
committerLennart Poettering <lennart@poettering.net>2017-11-16 14:38:36 +0100
commit5afe510c89f26b0e721b276a0e78af914b47f0b0 (patch)
tree01b4c2c06fd8c2f737313fd02b35e08c9959ff35 /src/core/load-fragment.h
parent7eb2a8a1259043e107ebec94e30ed160a93f40a7 (diff)
downloadsystemd-5afe510c89f26b0e721b276a0e78af914b47f0b0.tar.gz
core: add a new unit file setting CollectMode= for tweaking the GC logic
Right now, the option only takes one of two possible values "inactive" or "inactive-or-failed", the former being the default, and exposing same behaviour as the status quo ante. If set to "inactive-or-failed" units may be collected by the GC logic when in the "failed" state too. This logic should be a nicer alternative to using the "-" modifier for ExecStart= and friends, as the exit data is collected and logged about and only removed when the GC comes along. This should be useful in particular for per-connection socket-activated services, as well as "systemd-run" command lines that shall leave no artifacts in the system. I was thinking about whether to expose this as a boolean, but opted for an enum instead, as I have the suspicion other tweaks like this might be a added later on, in which case we extend this setting instead of having to add yet another one. Also, let's add some documentation for the GC logic.
Diffstat (limited to 'src/core/load-fragment.h')
-rw-r--r--src/core/load-fragment.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h
index b0a3ce2c67..fbf2de23eb 100644
--- a/src/core/load-fragment.h
+++ b/src/core/load-fragment.h
@@ -122,6 +122,7 @@ int config_parse_exec_keyring_mode(const char *unit, const char *filename, unsig
int config_parse_job_timeout_sec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_job_running_timeout_sec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_log_extra_fields(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_collect_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
/* gperf prototypes */
const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, GPERF_LEN_TYPE length);