]> err.no Git - dpkg/commitdiff
s-s-d: Keep retrying even if the daemon removed the pidfile
authorGuillem Jover <guillem@debian.org>
Wed, 16 Jan 2008 05:55:32 +0000 (07:55 +0200)
committerGuillem Jover <guillem@debian.org>
Wed, 16 Jan 2008 07:15:04 +0000 (09:15 +0200)
Closes: #460903
ChangeLog
debian/changelog
utils/start-stop-daemon.c

index 376cb57fca8e2a748e2027602837e70bca1ada1f..da2892b5d075c88d8083e397cd792016e8d4125d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-16  Guillem Jover  <guillem@debian.org>
+
+       * utils/start-stop-daemon.c (do_pidfile): Cache pid value over
+       multiple calls.
+
 2008-01-16  Guillem Jover  <guillem@debian.org>
 
        * utils/start-stop-daemon.c: Fix indentation.
index a8992a7e0fef827c572853a94d58e81677660c55..0363c8d7827d266fd8aea7f4615b4e32e33eb46e 100644 (file)
@@ -6,6 +6,9 @@ dpkg (1.14.16) UNRELEASED; urgency=low
   * Do not warn about unrecognized Homepage field in binary package stanzas
     in dpkg-genchanges and dpkg-source. Closes: #460309
   * Do not use the enoent helper binary, and use perl POSIX module instead.
+  * Keep checking for the process when start-stop-daemon is called with
+    --retry even if the daemon removed the pidfile. Closes: #460903
+    Thanks to Justin Pryzby for the analysis.
 
   [ Frank Lichtenheld ]
   * Make the -L option of dpkg-parsechangelog actually work (it's
index 30bba74844570b3bcecee928e6d76aa28b2655a9..24537d9100f2882903d31c906f4969087635c3cc 100644 (file)
@@ -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) {