aboutsummaryrefslogtreecommitdiffstats
path: root/lock.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2003-08-13 08:24:54 +0000
committerEric S. Raymond <esr@thyrsus.com>2003-08-13 08:24:54 +0000
commitca5e85181f7b79cdb1d5425578cebba0432aa5d6 (patch)
tree4f83e375d89b02200e8547451bf8834a72c7ee29 /lock.c
parentdc7ccd12dc4dbf5a1b41a4be5864d9e9167e89c9 (diff)
downloadfetchmail-ca5e85181f7b79cdb1d5425578cebba0432aa5d6.tar.gz
fetchmail-ca5e85181f7b79cdb1d5425578cebba0432aa5d6.tar.bz2
fetchmail-ca5e85181f7b79cdb1d5425578cebba0432aa5d6.zip
More minor fixes.
svn path=/trunk/; revision=3834
Diffstat (limited to 'lock.c')
-rw-r--r--lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lock.c b/lock.c
index 8b3f03f3..7596d611 100644
--- a/lock.c
+++ b/lock.c
@@ -77,7 +77,7 @@ int lock_state(void)
{
bkgd = (fscanf(lockfp, "%d %d", &pid, &st) == 2);
- if (kill(pid, 0) == -1) {
+ if (pid == 0 || kill(pid, 0) == -1) {
fprintf(stderr,GT_("fetchmail: removing stale lockfile\n"));
pid = 0;
unlink(lockfile);