--- Src/hist.c 29 Oct 2003 19:17:30 -0000 1.47 +++ Src/hist.c 7 May 2004 15:39:44 -0000 @@ -2139,7 +2139,9 @@ lockhistfile(char *fn, int keep_trying) write(fd, tmpfile+len+1, strlen(tmpfile+len+1)); close(fd); while (link(tmpfile, lockfile) < 0) { - if (stat(lockfile, &sb) < 0) { + if (errno != EEXIST) + ; + else if (stat(lockfile, &sb) < 0) { if (errno == ENOENT) continue; }