1FERROR(3)                  Linux Programmer's Manual                 FERROR(3)
2
3
4

NAME

6       clearerr, feof, ferror, fileno - check and reset stream status
7

SYNOPSIS

9       #include <stdio.h>
10
11       void clearerr(FILE *stream);
12
13       int feof(FILE *stream);
14
15       int ferror(FILE *stream);
16
17       int fileno(FILE *stream);
18
19   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
20
21       fileno(): _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE
22

DESCRIPTION

24       The function clearerr() clears the end-of-file and error indicators for
25       the stream pointed to by stream.
26
27       The function feof() tests the  end-of-file  indicator  for  the  stream
28       pointed  to by stream, returning nonzero if it is set.  The end-of-file
29       indicator can be cleared only by the function clearerr().
30
31       The function ferror() tests the error indicator for the stream  pointed
32       to  by stream, returning nonzero if it is set.  The error indicator can
33       be reset only by the clearerr() function.
34
35       The function fileno() examines the  argument  stream  and  returns  its
36       integer descriptor.
37
38       For nonlocking counterparts, see unlocked_stdio(3).
39

ERRORS

41       These  functions  should  not fail and do not set the external variable
42       errno.  (However, in case fileno() detects that its argument is  not  a
43       valid stream, it must return -1 and set errno to EBADF.)
44

ATTRIBUTES

46   Multithreading (see pthreads(7))
47       The  clearerr(),  feof(),  ferror(), and fileno() functions are thread-
48       safe.
49

CONFORMING TO

51       The functions clearerr(), feof(), and ferror() conform to C89 and C99.
52

SEE ALSO

54       open(2), fdopen(3), stdio(3), unlocked_stdio(3)
55

COLOPHON

57       This page is part of release 3.53 of the Linux  man-pages  project.   A
58       description  of  the project, and information about reporting bugs, can
59       be found at http://www.kernel.org/doc/man-pages/.
60
61
62
63                                  2013-06-21                         FERROR(3)
Impressum