richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From 5078832417b89cfe92ad87133ecb4179a995db31 Mon Sep 17 00:00:00 2001
9fc0f6
From: Lennart Poettering <lennart@poettering.net>
9fc0f6
Date: Mon, 7 Jul 2014 17:33:46 +0200
9fc0f6
Subject: [PATCH] service: flush status text and errno values each time a
9fc0f6
 service is started
9fc0f6
9fc0f6
We shouldn't show status texts from previous service starts
9fc0f6
9fc0f6
(cherry picked from commit 8cfdb077b8e3da1c47fc1d735d051f21f33144c1)
9fc0f6
9fc0f6
Related: #1106457
9fc0f6
---
9fc0f6
 src/core/service.c | 4 ++++
9fc0f6
 1 file changed, 4 insertions(+)
9fc0f6
9fc0f6
diff --git a/src/core/service.c b/src/core/service.c
9fc0f6
index 814019d..a6d046c 100644
9fc0f6
--- a/src/core/service.c
9fc0f6
+++ b/src/core/service.c
9fc0f6
@@ -2579,6 +2579,10 @@ static int service_start(Unit *u) {
9fc0f6
         s->main_pid_alien = false;
9fc0f6
         s->forbid_restart = false;
9fc0f6
 
9fc0f6
+        free(s->status_text);
9fc0f6
+        s->status_text = NULL;
9fc0f6
+        s->status_errno = 0;
9fc0f6
+
9fc0f6
         service_enter_start_pre(s);
9fc0f6
         return 0;
9fc0f6
 }