]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
close.2: Add mention of the close-on-exec flag
authorMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 12 Sep 2016 12:54:38 +0000 (13:54 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 12 Sep 2016 12:54:38 +0000 (13:54 +0100)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/close.2

index 56577b140dea7752209e20cb7c794a2f3010e94d..4f806480b65f16ebcbc6b842ea9b2e64dcbd0457 100644 (file)
@@ -113,6 +113,13 @@ the data is physically stored on the underlying disk, use
 .BR fsync (2).
 (It will depend on the disk hardware at this point.)
 .PP
+The close-on-exec file descriptor flag can be used to ensure
+that a file descriptor is automatically closed upon a successful
+.BR execve (2);
+see
+.BR fcntl (2)
+for details.
+.PP
 It is probably unwise to close file descriptors while
 they may be in use by system calls in
 other threads in the same process.