FERROR(3S) FERROR(3S) NAME ferror, feof, clearerr, fileno - stream status inquiries SYNOPSIS #include <stdio.h> int ferror (FILE *stream); int feof (FILE *stream); void clearerr (FILE *stream); int fileno (FILE *stream); DESCRIPTION ferror returns non-zero when an I/O error has previously occurred reading from or writing to the named stream, otherwise zero. feof returns non-zero when EOF has previously been detected reading the named input stream, otherwise zero. clearerr resets the error indicator and EOF indicator to zero on the named stream. fileno returns the integer file descriptor associated with the named stream (see below for common file descriptors, and open(2) for general information on file descriptors.) The following symbolic values in <unistd.h> define the file descriptors that are associated with the C language stdin, stdout, and stderr when an application is started: Name Description Value STDIN_FILENO Standard input value, stdin 0 STDOUT_FILENO Standard output value, stdout 1 STDERR_FILENO Standard error value, stderr 2 NOTES All of these functions are implemented both as functions in the C library and as macros in <stdio.h>. SEE ALSO open(2), fopen(3S), stdio(3S). Page 1