systemd/0024-service-flush-status-text-and-errno-values-each-time.patch
2014-07-19 15:47:59 -04:00

28 lines
843 B
Diff

From 853896f09d35f8c2db3bf25376d1c3ab240287ed Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 7 Jul 2014 17:33:46 +0200
Subject: [PATCH] service: flush status text and errno values each time a
service is started
We shouldn't show status texts from previous service starts
(cherry picked from commit 8cfdb077b8e3da1c47fc1d735d051f21f33144c1)
---
src/core/service.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/core/service.c b/src/core/service.c
index 0b19767d9e..2d8aa01445 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1699,6 +1699,9 @@ static int service_start(Unit *u) {
s->main_pid_alien = false;
s->forbid_restart = false;
+ free(s->status_text);
+ s->status_text = NULL;
+
service_enter_start_pre(s);
return 0;
}