summaryrefslogtreecommitdiff
path: root/src/shared/exit-status.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-03 12:47:40 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-03 12:51:07 +0200
commit37520c1bec9a92adbe02fceaece588a7aa2fea2b (patch)
treefce49d94c6c67e2563f86b509c4d07b582a35849 /src/shared/exit-status.c
parentffd488e272aa95f7d43626e1f90fea8c30a5863b (diff)
core: introduce new RestartForceExitStatus= service setting
This does the inverse of RestartPreventExitStatus=: it forces a restart of a service when a certain exit status is returned by a service process.
Diffstat (limited to 'src/shared/exit-status.c')
-rw-r--r--src/shared/exit-status.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shared/exit-status.c b/src/shared/exit-status.c
index ce1f1bde65..38d71e182d 100644
--- a/src/shared/exit-status.c
+++ b/src/shared/exit-status.c
@@ -208,3 +208,11 @@ bool is_clean_exit_lsb(int code, int status, ExitStatusSet *success_status) {
code == CLD_EXITED &&
(status == EXIT_NOTINSTALLED || status == EXIT_NOTCONFIGURED);
}
+
+void exit_status_set_free(ExitStatusSet *x) {
+ assert(x);
+
+ set_free(x->code);
+ set_free(x->signal);
+ x->code = x->signal = NULL;
+}