]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/fcloseall.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / fcloseall.3
CommitLineData
c11b1abf 1.\" Copyright (c) 2006 by Michael Kerrisk <mtk.manpages@gmail.com>
fea681da 2.\"
5fbde956 3.\" SPDX-License-Identifier: Linux-man-pages-copyleft
fea681da 4.\"
45186a5d 5.TH FCLOSEALL 3 2021-03-22 "Linux man-pages (unreleased)"
fea681da
MK
6.SH NAME
7fcloseall \- close all open streams
afa8db94
AC
8.SH LIBRARY
9Standard C library
10.RI ( libc ", " \-lc )
fea681da 11.SH SYNOPSIS
d5d687b1 12.nf
b80f966b 13.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
fea681da 14.B #include <stdio.h>
68e4db0a 15.PP
fea681da 16.B int fcloseall(void);
d5d687b1 17.fi
fea681da
MK
18.SH DESCRIPTION
19The
e511ffb6 20.BR fcloseall ()
c1cf42a5
MK
21function closes all of the calling process's open streams.
22Buffered output for each stream is written before it is closed
23(as for
24.BR fflush (3));
25buffered input is discarded.
847e0d88 26.PP
c1cf42a5
MK
27The standard streams,
28.IR stdin ,
29.IR stdout ,
30and
0daa9e92 31.I stderr
c1cf42a5 32are also closed.
47297adb 33.SH RETURN VALUE
c1cf42a5 34This function returns 0 if all files were successfully closed;
c13182ef
MK
35on error,
36.B EOF
c1cf42a5 37is returned.
f4d7c22b 38.SH ATTRIBUTES
548c91cd
MK
39For an explanation of the terms used in this section, see
40.BR attributes (7).
c466875e
MK
41.ad l
42.nh
548c91cd
MK
43.TS
44allbox;
c466875e 45lbx lb lb
548c91cd
MK
46l l l.
47Interface Attribute Value
48T{
49.BR fcloseall ()
72c3922a 50T} Thread safety MT-Unsafe race:streams
548c91cd 51.TE
c466875e
MK
52.hy
53.ad
54.sp 1
548c91cd 55.PP
f4d7c22b
PH
56The
57.BR fcloseall ()
58function does not lock the streams, so it is not thread-safe.
3113c7f3 59.SH STANDARDS
c1cf42a5 60This function is a GNU extension.
47297adb 61.SH SEE ALSO
fea681da
MK
62.BR close (2),
63.BR fclose (3),
64.BR fflush (3),
65.BR fopen (3),
0a4f8b7b 66.BR setbuf (3)