.\" .\" This file and its contents are supplied under the terms of the .\" Common Development and Distribution License ("CDDL"), version 1.0. .\" You may only use this file in accordance with the terms of version .\" 1.0 of the CDDL. .\" .\" A full copy of the text of the CDDL should have accompanied this .\" source. A copy of the CDDL is also available via the Internet at .\" http://www.illumos.org/license/CDDL. .\" .\" .\" Copyright (c) 2014, Joyent, Inc. .\" .Dd "Dec 20, 2014" .Dt FCLOSEALL 3C .Os .Sh NAME .Nm fcloseall .Nd close all standard I/O streams .Sh SYNOPSIS .In stdio.h .Ft int .Fo fcloseall .Fa void .Fc .Sh DESCRIPTION The .Fn fcloseall function closes all open standard I/O streams. The equivalent of .Xr fflush 3C is called on each stream before closing, thus any buffered or pending input is discarded while any buffered or pending output is written out to the underlying file. This includes the standard streams, .Vt stdin , .Vt stdout , and .Vt stderr . .Sh RETURN VALUES Currently, the function .Fn fcloseall always returns .Sy 0 . Note, portable applications should always check the return value. .Sh INTERFACE STABILITY .Sy Committed . .Sh MT-LEVEL .Sy Mt-Safe . .Sh SEE ALSO .Xr close 2 , .Xr fflush 3C , .Xr attributes 5 , .Xr environ 5 , .Xr standards 5