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