On 09/05/11 08:37, Matthew D. Fuller wrote:
I've long gotten semi-regular locking failures from xauth where there
really shouldn't be. Tracked down to error checking in libXau being
too restrictive on the failure mechanisms it expects.
-- Matthew Fuller (MF4839) | [email protected] Systems/Network
Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody
can hear you scream.
0001-Improve-the-handling-of-normal-locking-collisions.patch
From 1ea426ce3960e59d08dd5d6911c239594b8256c4 Mon Sep 17 00:00:00 2001
From: "Matthew D. Fuller"<[email protected]>
Date: Mon, 5 Sep 2011 10:31:14 -0500
Subject: [PATCH] Improve the handling of "normal" locking collisions.
EEXIST is a perfectly normal and expected errno for open(O_CREAT |
O_EXCL), and is a signal to loop around and retry, not return with an
error.
Signed-off-by: Matthew D. Fuller<[email protected]>
---
AuLock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/AuLock.c b/AuLock.c
index c236027..91d0f31 100644
--- a/AuLock.c
+++ b/AuLock.c
@@ -81,7 +81,7 @@ long dead)
if (creat_fd == -1) {
creat_fd = open (creat_name, O_WRONLY | O_CREAT | O_EXCL, 0600);
if (creat_fd == -1) {
- if (errno != EACCES)
+ if (errno != EACCES&& errno != EEXIST)
return LOCK_ERROR;
} else
(void) close (creat_fd);
Reviewed-by: Alan Coopersmith <[email protected]>
--
-Alan Coopersmith- [email protected]
Oracle Solaris Platform Engineering: X Window System
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel