Unlink the PID file when terminating.
[doldaconnect.git] / daemon / main.c
index 1c19101..20aee80 100644 (file)
@@ -562,5 +562,7 @@ int main(int argc, char **argv)
     }
     flog(LOG_INFO, "terminating...");
     terminate();
+    if(pidfile != NULL)
+       unlink(pidfile);
     return(0);
 }