Commit 5bea7863 authored by Janne Blomqvist's avatar Janne Blomqvist Committed by Morris Jette
Browse files

Create files with O_CLOEXEC flag

Recent Unix'es support a O_CLOEXEC flag to open(), which avoids the potential race condition between opening and setting close-on-exec with fcntl() (and of course, one syscall less). The attached patch does this for a few cases. There are still many more places where this approach could be used; for sockets there is also the Linux-specific SOCK_CLOEXEC flag.
parent 211b2392
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment