|Linux & Unix Commands - Search Man Pages
close - close a file
Given a file descriptor such as returned from an open, creat, dup or pipe(2) call, close
closes the associated file. A close of all files is automatic on exit, but since there is
a limit on the number of open files per process, close is necessary for programs which
deal with many files.
Files are closed upon termination of a process, and certain file descriptors may be closed
by exec(2) (see ioctl(2)).
creat(2), open(2), pipe(2), exec(2), ioctl(2)
Zero is returned if a file is closed; -1 is returned for an unknown file descriptor.
(close = 6.)
(file descriptor in r0)
All times are GMT -4. The time now is 09:08 PM.