-Files are closed upon termination of a process, and
-certain high-numbered file descriptors are closed by
-.IR exec (2),
-and it is possible to arrange for others to be closed
-(see FIOCLEX in
-.IR ioctl (2)).
+When a process forks (see
+.IR fork (2)),
+all descriptors for the new child process reference the same
+objects as they did in the parent before the fork.
+If a new process is then to be run using
+.IR execve (2),
+the process would normally inherit these descriptors. Most
+of the descriptors can be rearranged with
+.IR dup2 (2)
+or deleted with
+.I close
+before the
+.I execve
+is attempted, but if some of these descriptors will still
+be needed if the execve fails, it is necessary to arrange for them
+to be closed if the execve succeeds.
+For this reason, the call ``fcntl(d, F_SETFD, 1)'' is provided
+which arranges that a descriptor will be closed after a successful
+execve; the call ``fcntl(d, F_SETFD, 0)'' restores the default,
+which is to not close the descriptor.
+.SH "RETURN VALUE
+Upon successful completion, a value of 0 is returned.
+Otherwise, a value of \-1 is returned and the global integer variable
+.I errno
+is set to indicate the error.
+.SH ERRORS
+.I Close
+will fail if:
+.TP 15
+[EBADF]
+\fID\fP is not an active descriptor.