HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
940daec
)
(lock_if_free): After deleting a stale lock,
author
Richard M. Stallman
<rms@gnu.org>
Mon, 24 May 1999 09:19:06 +0000
(09:19 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Mon, 24 May 1999 09:19:06 +0000
(09:19 +0000)
try again to lock the file.
src/filelock.c
patch
|
blob
|
blame
|
history
diff --git
a/src/filelock.c
b/src/filelock.c
index
f5e4fb8
..
2f880d1
100644
(file)
--- 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;
}