V8/usr/man/man2/close.2

Compare this file to the similar file:
Show the results in this format:

.TH CLOSE 2 
.SH NAME
close \- close a file
.SH SYNOPSIS
.B close(fildes)
.SH DESCRIPTION
.I Close
closes the file associated with a file descriptor.
.PP
Files are closed upon termination of a process,
but since
there is a limit on the number of open files per process,
.I close
is necessary for programs which deal with many files.
It is possible to arrange for files to be closed
by
.IR exec (2);
see FIOCLEX in
.IR ioctl (2).
.SH "SEE ALSO"
creat(2), open(2), pipe(2), exec(2), ioctl(2)
.SH DIAGNOSTICS
Zero is returned if a file is closed;
\-1 is returned for an unknown file descriptor.