Quoting from Rob MacGregor's mail on Tue, Oct 08, 2002 at 09:57:09AM +0000:
Standard advice, try it on the latest (6.1.0 I think) and if it still
errors get back to the list.
I tried creating an empty pid file and check if fetchmail runs after
that.
$ fetchmail -q
$ touch ~/.fetchmail.pid
$ fetchmail
fetchmail: lock creation failed.
Here is a patch which does one more sanity check.
=================================================================
diff -Naur fetchmail-6.1.0.orig/lock.c fetchmail-6.1.0/lock.c
--- fetchmail-6.1.0.orig/lock.c Wed Sep 4 19:12:28 2002
+++ fetchmail-6.1.0/lock.c Tue Oct 8 22:24:15 2002
@@ -77,7 +77,7 @@
{
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);
=================================================================
Sunil Shetye.