2007-09-20 06:52:22 +00:00
|
|
|
.\" Copyright (c) 2006 by Michael Kerrisk <mtk.manpages@gmail.com>
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
2006-12-27 05:20:08 +00:00
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
2006-12-27 05:20:08 +00:00
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
2006-12-27 05:20:08 +00:00
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
2008-03-18 14:47:54 +00:00
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
|
|
|
.\"
|
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
|
|
.\" License.
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
2006-12-27 05:20:08 +00:00
|
|
|
.TH FCLOSEALL 3 2006-12-27 "GNU" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
fcloseall \- close all open streams
|
|
|
|
.SH SYNOPSIS
|
2007-05-11 18:36:21 +00:00
|
|
|
.nf
|
2004-11-03 13:51:07 +00:00
|
|
|
.B #define _GNU_SOURCE
|
|
|
|
.B #include <stdio.h>
|
|
|
|
.sp
|
|
|
|
.B int fcloseall(void);
|
2007-05-11 18:36:21 +00:00
|
|
|
.fi
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
The
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR fcloseall ()
|
2006-12-27 05:20:08 +00:00
|
|
|
function closes all of the calling process's open streams.
|
|
|
|
Buffered output for each stream is written before it is closed
|
|
|
|
(as for
|
|
|
|
.BR fflush (3));
|
|
|
|
buffered input is discarded.
|
|
|
|
|
|
|
|
The standard streams,
|
|
|
|
.IR stdin ,
|
|
|
|
.IR stdout ,
|
|
|
|
and
|
2007-09-20 16:26:31 +00:00
|
|
|
.I stderr
|
2006-12-27 05:20:08 +00:00
|
|
|
are also closed.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "RETURN VALUE"
|
2006-12-27 05:20:08 +00:00
|
|
|
This function returns 0 if all files were successfully closed;
|
2007-04-12 22:42:49 +00:00
|
|
|
on error,
|
|
|
|
.B EOF
|
2006-12-27 05:20:08 +00:00
|
|
|
is returned.
|
|
|
|
.SH "CONFORMING TO"
|
|
|
|
This function is a GNU extension.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR close (2),
|
|
|
|
.BR fclose (3),
|
|
|
|
.BR fflush (3),
|
|
|
|
.BR fopen (3),
|
2007-01-28 20:00:24 +00:00
|
|
|
.BR setbuf (3),
|
|
|
|
.BR feature_test_macros (7)
|