Fix instance counting bug (incorrect use of fcntl return code).
SVN revision: 32582
This commit is contained in:
parent
0092b853de
commit
45e9c1186d
|
@ -5727,7 +5727,7 @@ Epplet_find_instance(char *name)
|
|||
for (;;)
|
||||
{
|
||||
err = fcntl(fd, F_SETLK, &fl);
|
||||
if (err != EINTR)
|
||||
if (err == 0 || errno != EINTR)
|
||||
break;
|
||||
}
|
||||
if (err == 0)
|
||||
|
@ -5736,6 +5736,11 @@ Epplet_find_instance(char *name)
|
|||
locked = 1;
|
||||
break;
|
||||
}
|
||||
if (errno == EACCES || errno == EAGAIN)
|
||||
{
|
||||
/* Locking failed due to held lock */
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue