Open the X11 socket with close-on-exec flag
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 13 Feb 2010 10:23:51 +0000 (12:23 +0200)
committerJulien Danjou <julien@danjou.info>
Wed, 17 Feb 2010 09:09:43 +0000 (10:09 +0100)
commit53a9834e4cdd11aba8c1cc49347f09a958107de8
treefd98736bfedd488680d4f6a9bf3f23d73b06c4d5
parent367882fa32489ebafcd9afc04fbf732b02ceb33a
Open the X11 socket with close-on-exec flag

This saves the X11 connection from leaking into children processes.
On Linux, this is fully thread-safe using SOCK_CLOEXEC. On other
systems, there is a small race condition.

Signed-off-by: Julien Danjou <julien@danjou.info>
src/xcb_util.c