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

NAME

6       fcloseall - close all open streams
7

SYNOPSIS

9       #define _GNU_SOURCE         /* See feature_test_macros(7) */
10       #include <stdio.h>
11
12       int fcloseall(void);
13

DESCRIPTION

15       The  fcloseall()  function  closes  all  of  the calling process's open
16       streams.  Buffered output for each  stream  is  written  before  it  is
17       closed (as for fflush(3)); buffered input is discarded.
18
19       The standard streams, stdin, stdout, and stderr are also closed.
20

RETURN VALUE

22       This  function  returns  0  if  all  files were successfully closed; on
23       error, EOF is returned.
24

ATTRIBUTES

26       For  an  explanation  of  the  terms  used   in   this   section,   see
27       attributes(7).
28
29       ┌────────────┬───────────────┬────────────────────────┐
30Interface   Attribute     Value                  
31       ├────────────┼───────────────┼────────────────────────┤
32fcloseall() │ Thread safety │ MT-Unsafe race:streams │
33       └────────────┴───────────────┴────────────────────────┘
34       The  fcloseall()  function  does  not  lock  the  streams, so it is not
35       thread-safe.
36

CONFORMING TO

38       This function is a GNU extension.
39

SEE ALSO

41       close(2), fclose(3), fflush(3), fopen(3), setbuf(3)
42

COLOPHON

44       This page is part of release 4.15 of the Linux  man-pages  project.   A
45       description  of  the project, information about reporting bugs, and the
46       latest    version    of    this    page,    can     be     found     at
47       https://www.kernel.org/doc/man-pages/.
48
49
50
51GNU                               2017-09-15                      FCLOSEALL(3)
Impressum