This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Thread-safe creation of UNIX domain sockets
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: libc-help at sourceware dot org
- Date: Sat, 27 Dec 2008 14:56:06 +0100
- Subject: Thread-safe creation of UNIX domain sockets
Is it possible to create UNIX domain sockets with specific file system
permissions in a thread-safe way?
In a single-threaded program, it's possible to set the umask to 0777,
create the socket, restore the umask, and chmod the path to the
intended permission set. In a multi-threaded program, this is
obviously racy.