X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/0f4556f12c8f75078501c9d1338ae7648a97f975..95f51977ddc18faa2e212f30c00a39540b39f325:/usr/man/man2/close.2 diff --git a/usr/man/man2/close.2 b/usr/man/man2/close.2 index 2883d94c91..bf9ee1378a 100644 --- a/usr/man/man2/close.2 +++ b/usr/man/man2/close.2 @@ -1,4 +1,10 @@ -.TH CLOSE 2 "27 July 1983" +.\" Copyright (c) 1980 Regents of the University of California. +.\" All rights reserved. The Berkeley software License Agreement +.\" specifies the terms and conditions for redistribution. +.\" +.\" @(#)close.2 6.3 (Berkeley) 5/22/86 +.\" +.TH CLOSE 2 "May 22, 1986" .UC 4 .SH NAME close \- delete a descriptor @@ -18,15 +24,15 @@ on the last close of a .IR socket (2) associated naming information and queued data are discarded; on the last close of a file holding an advisory lock -the lock is released; see further -.IR flock (2). +the lock is released (see further +.IR flock (2)\fR). .PP A close of all of a process's descriptors is automatic on .IR exit , but since there is a limit on the number of active descriptors per process, .I close -is necessary for programs which deal with many descriptors. +is necessary for programs that deal with many descriptors. .PP When a process forks (see .IR fork (2)), @@ -44,7 +50,7 @@ before the 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 +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.