chiark / gitweb /
service: don't try to guess PID for SysV services anymore
authorLennart Poettering <lennart@poettering.net>
Tue, 11 Oct 2011 18:21:06 +0000 (20:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 11 Oct 2011 18:21:06 +0000 (20:21 +0200)
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.

src/service.c

index c2053ce3ac45e8d829bc232e28c52e4e61f748a2..e64d289fede715dd13b1829c5a9fcd963c725e64 100644 (file)
@@ -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)