From ca5e85181f7b79cdb1d5425578cebba0432aa5d6 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 13 Aug 2003 08:24:54 +0000 Subject: More minor fixes. svn path=/trunk/; revision=3834 --- fetchmail.c | 9 +++++++++ indexgen.sh | 56 +++++++++++++++++++++++++++++++------------------------- lock.c | 2 +- 3 files changed, 41 insertions(+), 26 deletions(-) diff --git a/fetchmail.c b/fetchmail.c index 8a0cdf0b..e4a8cb72 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -368,6 +368,15 @@ int main(int argc, char **argv) if (argc == 2) exit(PS_EXCLUDE); } + else if (getpid() == pid) + { + /* this test enables re-execing on a changed rcfile */ + if (argc == 2) + { + fprintf(stderr,GT_("fetchmail: no other fetchmail is running\n")); + exit(PS_EXCLUDE); + } + } else if (kill(pid, SIGTERM) < 0) { fprintf(stderr,GT_("fetchmail: error killing %s fetchmail at %d; bailing out.\n"), diff --git a/indexgen.sh b/indexgen.sh index 0843952c..8a3690b1 100755 --- a/indexgen.sh +++ b/indexgen.sh @@ -46,27 +46,41 @@ cat >index.html < -Fetchmail Home Page - - - + + + + + +The fechmail home page - -
Back to -Software -Up to Site Map -$date -
-
-
- + +
- + +
-
fetchmail logo
-
The fetchmail home page$date
+ + + + +
+

The fetchmail Home Page

@@ -365,16 +379,8 @@ ftp://ftp.win.ne.jp/pub/network/mail/fetchmail.

Fetchmail was a five-star Editor's Pick at Softlandindia.

-
- -
Back to -Software -Up to Site Map -$date -
+ -
-
Eric S. Raymond <esr@snark.thyrsus.com>
EOF 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); -- cgit v1.2.3