Blob Blame History Raw
From 1835f23c2a53e632959270e79dbf3143874e6111 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 11 Oct 2011 20:21:06 +0200
Subject: [PATCH] service: don't try to guess PID for SysV services anymore

As it turns out there are quite a number of SysV services too broken to
make the guessing work: instead of returning in the parent only after
the child is fully initialized they return immediately. The effect is
that the guessing in systemd might happen too early, at a time where the
final main process doesn't exist yet.

By turning this off we won't try to detect the main pid anymore, with
the effect that all processes of the service in question are considered
equally likely to be the main process.
---
[ fixed reject -- michich ]

 src/service.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Index: systemd-26/src/service.c
===================================================================
--- systemd-26.orig/src/service.c
+++ systemd-26/src/service.c
@@ -827,6 +827,7 @@ static int service_load_sysv_path(Servic
         /* Special setting for all SysV services */
         s->type = SERVICE_FORKING;
         s->remain_after_exit = true;
+        s->guess_main_pid = false;
         s->restart = SERVICE_RESTART_NO;
 
         if (s->meta.manager->sysv_console)