1.\" 2.\" This file and its contents are supplied under the terms of the 3.\" Common Development and Distribution License ("CDDL"), version 1.0. 4.\" You may only use this file in accordance with the terms of version 5.\" 1.0 of the CDDL. 6.\" 7.\" A full copy of the text of the CDDL should have accompanied this 8.\" source. A copy of the CDDL is also available via the Internet at 9.\" http://www.illumos.org/license/CDDL. 10.\" 11.\" 12.\" Copyright (c) 2014, Joyent, Inc. 13.\" 14.Dd "Dec 20, 2014" 15.Dt FCLOSEALL 3C 16.Os 17.Sh NAME 18.Nm fcloseall 19.Nd close all standard I/O streams 20.Sh SYNOPSIS 21.In stdio.h 22.Ft int 23.Fo fcloseall 24.Fa void 25.Fc 26.Sh DESCRIPTION 27The 28.Fn fcloseall 29function closes all open standard I/O streams. The equivalent of 30.Xr fflush 3C 31is called on each stream before closing, thus any buffered or pending 32input is discarded while any buffered or pending output is written out 33to the underlying file. This includes the standard streams, 34.Vt stdin , 35.Vt stdout , 36and 37.Vt stderr . 38.Sh RETURN VALUES 39Currently, the function 40.Fn fcloseall 41always returns 42.Sy 0 . 43Note, portable applications should always check the return value. 44.Sh INTERFACE STABILITY 45.Sy Committed . 46.Sh MT-LEVEL 47.Sy Mt-Safe . 48.Sh SEE ALSO 49.Xr close 3C , 50.Xr fflush 3C , 51.Xr attributes 5 , 52.Xr environ 5 , 53.Xr standards 5 54