summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2008-01-16 07:55:32 +0200
committerGuillem Jover <guillem@debian.org>2008-01-16 09:15:04 +0200
commitb6a8bc8f16e208e47416102ccdb67149bb4ddc1b (patch)
tree27a0a89b419fb5e88754cb61bee9371fc3f2e90a /utils
parentb2a61ec82e0bb2d6ad11e68343bd0c54c6ca28c3 (diff)
downloaddpkg-b6a8bc8f16e208e47416102ccdb67149bb4ddc1b.tar.gz
s-s-d: Keep retrying even if the daemon removed the pidfile
Closes: #460903
Diffstat (limited to 'utils')
-rw-r--r--utils/start-stop-daemon.c7
1 files changed, 6 insertions, 1 deletions
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) {