chiark / gitweb /
Unlink lockfiles for old feeds
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 18 Apr 2010 13:27:26 +0000 (14:27 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 18 Apr 2010 13:27:26 +0000 (14:27 +0100)
backends/innduct.c

index a915b17..1c41554 100644 (file)
@@ -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);
   }