diff options
author | Richard M. Stallman <rms@gnu.org> | 1999-05-24 09:19:06 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1999-05-24 09:19:06 +0000 |
commit | cfc01fa7422e5871197f42eb00bb3c80e37f9f61 (patch) | |
tree | dc9779671ecf64b343435c2b23a8434bb21084a7 | |
parent | 940daec19b586319a0c223742bd3330d06b8195f (diff) | |
download | emacs-cfc01fa7422e5871197f42eb00bb3c80e37f9f61.tar.gz |
(lock_if_free): After deleting a stale lock,
try again to lock the file.
-rw-r--r-- | src/filelock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filelock.c b/src/filelock.c index f5e4fb85966..2f880d10d2d 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -521,7 +521,7 @@ lock_if_free (clasher, lfname) lock_info_type *clasher; register char *lfname; { - if (lock_file_1 (lfname, 0) == 0) + while (lock_file_1 (lfname, 0) == 0) { int locker; @@ -537,7 +537,7 @@ lock_if_free (clasher, lfname) else if (locker == 1) return 1; /* Someone else has it. */ - return -1; /* Something's wrong. */ + /* We deleted a stale lock; try again to lock the file. */ } return 0; } |