Include:
Prototype: int close(int handle);
Returns: 0 if successful, or -1 if not.
errno: EBADF
See also: chsize, creat, dup, dup2, open, unlink
The close function closes the file associated with handle.
Return Value
The close function returns 0 if the file was successfully closed. A return
value of -1 indicates an error, and errno is set to EBADF, indicating an
invalid file-handle argument.