summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-10-11 20:21:06 +0200
committerLennart Poettering <lennart@poettering.net>2011-10-11 20:21:06 +0200
commit1835f23c2a53e632959270e79dbf3143874e6111 (patch)
treee44250191e0f3e43b0dc9860b654099158028a64 /src/service.c
parentc70ac211b486c70271e265d142f3b73e323faf6e (diff)
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.
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index c2053ce3ac..e64d289fed 100644
--- a/src/service.c
+++ b/src/service.c
@@ -829,6 +829,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
/* Special setting for all SysV services */
s->type = SERVICE_FORKING;
s->remain_after_exit = !s->pid_file;
+ s->guess_main_pid = false;
s->restart = SERVICE_RESTART_NO;
if (s->meta.manager->sysv_console)