CLOSE(S) XENIX System V CLOSE(S)
Name
close - Closes a file descriptor.
Syntax
int close (fildes)
int fildes;
Description
fildes is a file descriptor obtained from a creat, open,
dup, fcntl, or pipe system call. close closes the file
descriptor indicated by fildes. All outstanding record
locks on the file indicated by fildes that are owned by the
calling process are removed.
close will fail if fildes is not a valid open file
descriptor. [EBADF]
Return Value
Upon successful completion, a value of 0 is returned.
Otherwise, a value of -1 is returned and errno is set to
indicate the error.
See Also
creat(S), dup(S), exec(S), fcntl(S), open(S), pipe(S)
Page 1 (printed 8/7/87)