diff options
author | Rob Austein <sra@hactrn.net> | 2008-12-07 01:16:05 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2008-12-07 01:16:05 +0000 |
commit | 36075b33a51adb031205dcb2e369f928d1e41397 (patch) | |
tree | dea13543bded7872f00313a10180729d3c1fec5e /rcynic | |
parent | 8ab0498cce4314abee7a87839b9abc24b44e7220 (diff) |
Clean up lock file
svn path=/rcynic/rcynic.c; revision=2035
Diffstat (limited to 'rcynic')
-rw-r--r-- | rcynic/rcynic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rcynic/rcynic.c b/rcynic/rcynic.c index 5f69d228..2fb62090 100644 --- a/rcynic/rcynic.c +++ b/rcynic/rcynic.c @@ -2797,6 +2797,7 @@ int main(int argc, char *argv[]) logmsg(&rc, log_telemetry, "Lock %s held by another process", lockfile); else logmsg(&rc, log_sys_err, "Problem locking %s: %s", lockfile, strerror(errno)); + lockfd = -1; goto done; } @@ -3029,6 +3030,8 @@ int main(int argc, char *argv[]) free(rc.unauthenticated); if (rc.rsync_program) free(rc.rsync_program); + if (lockfile && lockfd >= 0) + unlink(lockfile); if (lockfile) free(lockfile); if (xmlfile) |