From b6a8bc8f16e208e47416102ccdb67149bb4ddc1b Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 16 Jan 2008 07:55:32 +0200 Subject: s-s-d: Keep retrying even if the daemon removed the pidfile Closes: #460903 --- utils/start-stop-daemon.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index 30bba7484..24537d910 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -848,7 +848,12 @@ static void do_pidfile(const char *name) { FILE *f; - pid_t pid; + static pid_t pid = 0; + + if (pid) { + check(pid); + return; + } f = fopen(name, "r"); if (f) { -- cgit v1.2.3