Clarified what type of lock close() affects.

Minor formatting changes.
This commit is contained in:
Michael Kerrisk 2005-06-22 10:49:19 +00:00
parent cff88e99ab
commit 082aa7841d
1 changed files with 6 additions and 3 deletions

View File

@ -42,9 +42,12 @@ close \- close a file descriptor
.BI "int close(int " fd );
.fi
.SH DESCRIPTION
.B close
.BR close ()
closes a file descriptor, so that it no longer refers to any file and
may be reused. Any locks held on the file it was associated with,
may be reused.
Any record locks (see
.BR fcntl (2))
held on the file it was associated with,
and owned by the process, are removed (regardless of the file
descriptor that was used to obtain the lock).
.PP
@ -57,7 +60,7 @@ removed using
.BR unlink (2)
the file is deleted.
.SH "RETURN VALUE"
.B close
.BR close ()
returns zero on success.
On error, \-1 is returned, and
.I errno