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

Olivier Fourdan ofourdan at redhat.com
Wed Jun 24 00:03:40 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 range of the client select mask to avoid
reaching the maximum number of clients prematurely.

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

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
 v3: Fix funky spelling/syntax in commit message

 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