mirror of https://github.com/mkerrisk/man-pages
Clarified what type of lock close() affects.
Minor formatting changes.
This commit is contained in:
parent
cff88e99ab
commit
082aa7841d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue