mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-24 19:03:29 +00:00
(lock_if_free): After deleting a stale lock,
try again to lock the file.
This commit is contained in:
parent
940daec19b
commit
cfc01fa742
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user