Go to the previous, next section.
int close(int fd);
fd: [in] the file descriptor to close.
Closes the file descriptor fd. If fd is the last file descriptor refering to a file, then the ressources associated with that file are deallocated. The lock held on the file by the current task are released.
On success zero is returned. On error, -1 is returned and errno
is
set to EBADF
.
Go to the previous, next section.