2 .\" Copyright (c) 2006 by Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .TH fcloseall 3 (date) "Linux man-pages (unreleased)"
8 fcloseall \- close all open streams
11 .RI ( libc ", " \-lc )
14 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
17 .B int fcloseall(void);
22 function closes all of the calling process's open streams.
23 Buffered output for each stream is written before it is closed
26 buffered input is discarded.
35 This function returns 0 if all files were successfully closed;
40 For an explanation of the terms used in this section, see
48 Interface Attribute Value
51 T} Thread safety MT-Unsafe race:streams
59 function does not lock the streams, so it is not thread-safe.
61 This function is a GNU extension.