Go to the previous, next section.

close

SYNOPSIS

int close(int fd);

PARAMETERS

fd: [in] the file descriptor to close.

DESCRIPTION

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.

RETURN VALUE

On success zero is returned. On error, -1 is returned and errno is set to EBADF.

Go to the previous, next section.