fcntl.2: Make the description of the effect of close-on-exec a little clearer

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-09-12 06:00:04 +01:00
parent fa1aa3502a
commit 8b4be846c7
1 changed files with 10 additions and 3 deletions

View File

@ -144,9 +144,16 @@ Currently, only one such flag is defined:
the close-on-exec flag.
If the
.B FD_CLOEXEC
bit is 0, the file descriptor will remain open across an
.BR execve (2),
otherwise it will be closed.
bit is set,
the file descriptor will automatically be closed during a successful
.BR execve (2).
(If the
.BR execve (2)
fails, the file descriptor is left open.)
If the
.B FD_CLOEXEC
bit is not set, the file descriptor will remain open across an
.BR execve (2).
.TP
.BR F_GETFD " (\fIvoid\fP)"
Return (as the function result) the file descriptor flags;