forked from pool/systemd
b8b836245b
- Add systemctl-options.patch: handle SYSTEMCTL_OPTIONS internaly (bnc#798620). - Update crypt-loop-file.patch to correctly detect crypto loop files (bnc#799514). - Add journalctl-remove-leftover-message.patch: remove debug message in systemctl. - Add job-avoid-recursion-when-cancelling.patch: prevent potential recursion when cancelling a service. - Add sysctl-parse-all-keys.patch: ensure sysctl file is fully parsed. - Add journal-fix-cutoff-max-date.patch: fix computation of cutoff max date for journal. - Add reword-rescue-mode-hints.patch: reword rescue prompt. - Add improve-overflow-checks.patch: improve time overflow checks. - Add fix-swap-behaviour-with-symlinks.patch: fix swap behaviour with symlinks. - Add hostnamectl-fix-set-hostname-with-no-argument.patch: ensure hostnamectl requires an argument when called with set-hostname option. - Add agetty-overrides-term.patch: pass correctly terminal type to agetty. - Add check-for-empty-strings-in-strto-conversions.patch: better check for empty strings in strto* conversions. - Add strv-cleanup-error-path-loops.patch: cleanup strv on error path. - Add cryptsetup-handle-plain.patch: correctly handle "plain" option in cryptsetup. - Add fstab-generator-improve-error-message.patch: improve error message in fstab-generator. - Add delta-accept-t-option.patch: accept -t option in OBS-URL: https://build.opensuse.org/request/show/149703 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=331
49 lines
2.1 KiB
Diff
49 lines
2.1 KiB
Diff
From fbeefb45ac1a257a0c5af975ad26d68ed6c39fda Mon Sep 17 00:00:00 2001
|
|
From: Lennart Poettering <lennart@poettering.net>
|
|
Date: Mon, 14 Jan 2013 21:05:17 +0100
|
|
Subject: [PATCH] service: for Type=forking services, ignore exit status of
|
|
main process depending on ExecStart's ignore setting
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=860464
|
|
---
|
|
src/core/service.c | 18 ++++++++++++++----
|
|
1 file changed, 14 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/core/service.c b/src/core/service.c
|
|
index 8e9e112..7eaac0d 100644
|
|
--- a/src/core/service.c
|
|
+++ b/src/core/service.c
|
|
@@ -2926,15 +2926,25 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
|
|
s->main_pid = 0;
|
|
exec_status_exit(&s->main_exec_status, &s->exec_context, pid, code, status);
|
|
|
|
- /* If this is not a forking service than the main
|
|
- * process got started and hence we copy the exit
|
|
- * status so that it is recorded both as main and as
|
|
- * control process exit status */
|
|
if (s->main_command) {
|
|
+ /* If this is not a forking service than the
|
|
+ * main process got started and hence we copy
|
|
+ * the exit status so that it is recorded both
|
|
+ * as main and as control process exit
|
|
+ * status */
|
|
+
|
|
s->main_command->exec_status = s->main_exec_status;
|
|
|
|
if (s->main_command->ignore)
|
|
f = SERVICE_SUCCESS;
|
|
+ } else if (s->exec_command[SERVICE_EXEC_START]) {
|
|
+
|
|
+ /* If this is a forked process, then we should
|
|
+ * ignore the return value if this was
|
|
+ * configured for the starter process */
|
|
+
|
|
+ if (s->exec_command[SERVICE_EXEC_START]->ignore)
|
|
+ f = SERVICE_SUCCESS;
|
|
}
|
|
|
|
log_struct(f == SERVICE_SUCCESS ? LOG_DEBUG : LOG_NOTICE,
|
|
--
|
|
1.7.10.4
|
|
|