RTEMS Logo

RTEMS 4.8.0 On-Line Library


Input and Output Primitives Manager close - Closes a file.

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

5.4.4: close - Closes a file.

CALLING SEQUENCE:

#include <unistd.h>

int close(
  int fildes
);

STATUS CODES:

EBADF
Invalid file descriptor
EINTR
Function was interrupted by a signal.

DESCRIPTION:

The close() function deallocates the file descriptor named by fildes and makes it available for reuse. All outstanding record locks owned by this process for the file are unlocked.

NOTES:

A signal can interrupt the close() function. In that case, close() returns -1 with errno set to EINTR. The file may or may not be closed.


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2007OAR Corporation