From 9481af2261f3880d5636da02cd442c40bb022260 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 18 Apr 2010 14:27:26 +0100 Subject: [PATCH] Unlink lockfiles for old feeds --- backends/innduct.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backends/innduct.c b/backends/innduct.c index a915b17..1c41554 100644 --- a/backends/innduct.c +++ b/backends/innduct.c @@ -1495,6 +1495,7 @@ static void statemc_init(void) { xfstat_isreg(lockfd, &stabf, "lockfile"); xlstat_isreg(path_ductlock, &stab, &noent, "lockfile"); + if (!noent && samefile(&stab, &stabf)) break; @@ -1618,6 +1619,8 @@ static void *statemc_check_input_done(oop_source *lp, if (sms==sm_DROPPING) { notice("feed dropped and our work is complete" " (but check for backlog files)"); + r= unlink(path_ductlock); + if (r) sysdie("unlink lock file for old feed %s", path_ductlock); exit(0); } -- 2.30.2