-
- Downloads
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.
Showing
- src/common/daemonize.c 5 additions, 3 deletionssrc/common/daemonize.c
- src/common/fd.c 27 additions, 0 deletionssrc/common/fd.c
- src/common/fd.h 9 additions, 0 deletionssrc/common/fd.h
- src/slurmctld/controller.c 0 additions, 2 deletionssrc/slurmctld/controller.c
- src/slurmd/slurmd/slurmd.c 1 addition, 4 deletionssrc/slurmd/slurmd/slurmd.c
Loading
Please register or sign in to comment