From: Richard M. Stallman Date: Sun, 7 May 1995 22:36:27 +0000 (+0000) Subject: (main): Increase lock timeout to five minutes. X-Git-Tag: emacs-19.34~4112 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=66a8ad0fd41daca7da92b0cecc0c504a940f95ba;p=emacs.git (main): Increase lock timeout to five minutes. --- diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 36a837e9310..7160ae206cb 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -251,11 +251,14 @@ main (argc, argv) break; sleep (1); - /* If lock file is a minute old, unlock it. */ + /* If lock file is five minutes old, unlock it. + Five minutes should be good enough to cope with crashes + and wedgitude, and long enough to avoid being fooled + by time differences between machines. */ if (stat (lockname, &st) >= 0) { now = time (0); - if (st.st_ctime < now - 60) + if (st.st_ctime < now - 300) unlink (lockname); } }