Next Previous Contents

3.37 close

Function

Close a file descriptor.

Header

fcntl.h

Declaration

int __fastcall__ close (int fd);

Description

The function closes the given file descriptor. It returns zero on success and -1 on error. If an error occurs, the cause can be determined by reading the errno variable.

Limits

  • The function is only available as fastcall function, so it may only be used in presence of a prototype.

Availability

POSIX 1003.1

See also

creat, open

Example

None.


Next Previous Contents