comparison lib-src/movemail.c @ 11746:e93b5c05c949

(main): Increase lock timeout to five minutes.
author Richard M. Stallman <rms@gnu.org>
date Sun, 07 May 1995 22:36:27 +0000
parents 496576df5d46
children e2d27fbff935
comparison
equal deleted inserted replaced
11745:1136a3614d79 11746:e93b5c05c949
249 unlink (tempname); 249 unlink (tempname);
250 if (tem >= 0) 250 if (tem >= 0)
251 break; 251 break;
252 sleep (1); 252 sleep (1);
253 253
254 /* If lock file is a minute old, unlock it. */ 254 /* If lock file is five minutes old, unlock it.
255 Five minutes should be good enough to cope with crashes
256 and wedgitude, and long enough to avoid being fooled
257 by time differences between machines. */
255 if (stat (lockname, &st) >= 0) 258 if (stat (lockname, &st) >= 0)
256 { 259 {
257 now = time (0); 260 now = time (0);
258 if (st.st_ctime < now - 60) 261 if (st.st_ctime < now - 300)
259 unlink (lockname); 262 unlink (lockname);
260 } 263 }
261 } 264 }
262 265
263 delete_lockname = lockname; 266 delete_lockname = lockname;