From: Ian Jackson Date: Sun, 18 Apr 2010 13:27:26 +0000 (+0100) Subject: Unlink lockfiles for old feeds X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=inn-innduct.git;a=commitdiff_plain;h=9481af2261f3880d5636da02cd442c40bb022260 Unlink lockfiles for old feeds --- 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); }