[Xcb] [PATCH] Open the X11 socket with close-on-exec flag

Julien Danjou julien at danjou.info
Sun Feb 14 04:39:24 PST 2010


"Rémi Denis-Courmont" <remi at remlab.net> writes:

> Le samedi 13 février 2010 12:47:37 Julien Danjou, vous avez écrit :
> On Linux, that's not thread-safe. SOCK_CLOEXEC sets the flag atomically while 
> allocating the descriptor from the process file table.
> On other platforms, this patch merely shrinks the window of opportunity for 
> the race, which cannot be fully fixed.
>
> You have a point that the later close-on-exec setting becomes useless if 
> called through xcb_connect() though.

Fair enough.

-- 
Julien Danjou
// ᐰ <julien at danjou.info>   http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20100214/4a2f8abb/attachment.pgp 


More information about the Xcb mailing list