
TPMC118-SW-95 – QNX6 Neutrino Device Driver
Page 8 of 30
3.2 close()
NAME
close() – close a file descriptor
SYNOPSIS
#include <unistd.h>
int close (int filedes)
DESCRIPTION
The
close
function closes the file descriptor
filedes
.
EXAMPLE
int fd;
...
if (close(fd) != 0)
{
/* handle close error conditions */
}
RETURNS
The normal return value from close is 0. In the case of an error, a value of –1 is returned. The global
variable
errno
contains the detailed error code.
ERRORS
Returns only Neutrino specific error code, see Neutrino Library Reference.
SEE ALSO
Library Reference - close()