[PATCH v2] xwayland: keep temp files out of the client mask

Olivier Fourdan ofourdan at redhat.com
Tue Jun 23 07:28:48 PDT 2015


From: Chris Wilson <chris at chris-wilson.co.uk>

Xwayland opens anonymous files for its sharing buffers, move these
file descriptors out of the of irange of the the client select mask
to avoid reaching the maximum number of clients prematurely.

https://bugs.freedesktop.org/show_bug.cgi?id=91072

Reported-and-tested-by: Olivier Fourdan <fourdan at gmail.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 v2: Much better/simpler solution suggested by Chris in bug 91072

 hw/xwayland/xwayland-shm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xwayland/xwayland-shm.c b/hw/xwayland/xwayland-shm.c
index 2d0ce3e..1022c0d 100644
--- a/hw/xwayland/xwayland-shm.c
+++ b/hw/xwayland/xwayland-shm.c
@@ -82,7 +82,7 @@ create_tmpfile_cloexec(char *tmpname)
     }
 #endif
 
-    return fd;
+    return os_move_fd(fd);
 }
 
 /*
-- 
2.4.3



More information about the xorg-devel mailing list