]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/fcloseall.3
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / man3 / fcloseall.3
1 .\" Copyright (c) 2006 by Michael Kerrisk <mtk-manpages@gmx.net>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.
16 .\"
17 .TH FCLOSEALL 3 2006-12-27 "GNU" "Linux Programmer's Manual"
18 .SH NAME
19 fcloseall \- close all open streams
20 .SH SYNOPSIS
21 .B #define _GNU_SOURCE
22 .B #include <stdio.h>
23 .sp
24 .B int fcloseall(void);
25 .SH DESCRIPTION
26 The
27 .BR fcloseall ()
28 function closes all of the calling process's open streams.
29 Buffered output for each stream is written before it is closed
30 (as for
31 .BR fflush (3));
32 buffered input is discarded.
33
34 The standard streams,
35 .IR stdin ,
36 .IR stdout ,
37 and
38 .IR stderr
39 are also closed.
40 .SH "RETURN VALUE"
41 This function returns 0 if all files were successfully closed;
42 on error,
43 .B EOF
44 is returned.
45 .SH "CONFORMING TO"
46 This function is a GNU extension.
47 .SH "SEE ALSO"
48 .BR close (2),
49 .BR fclose (3),
50 .BR fflush (3),
51 .BR fopen (3),
52 .BR setbuf (3),
53 .BR feature_test_macros (7)