diff options
author | Robert Mustacchi <rm@joyent.com> | 2014-12-19 23:39:49 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2014-12-27 08:30:21 -0800 |
commit | ce83b99835cc4643ab0fefd88dea62427d9ced5e (patch) | |
tree | 578355fb9a32b7400b1d502e1881ed3bd21f4a7b | |
parent | 89b9271284be1a4e3e3053d7bc12f9bbf8145b06 (diff) | |
download | illumos-joyent-ce83b99835cc4643ab0fefd88dea62427d9ced5e.tar.gz |
3826 fcloseall() needs a manpage
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/man/man3c/Makefile | 1 | ||||
-rw-r--r-- | usr/src/man/man3c/fclose.3c | 8 | ||||
-rw-r--r-- | usr/src/man/man3c/fcloseall.3c | 53 | ||||
-rw-r--r-- | usr/src/man/man3c/fopen.3c | 9 | ||||
-rw-r--r-- | usr/src/man/man3lib/libc.3lib | 6 | ||||
-rw-r--r-- | usr/src/pkg/manifests/system-library.man3c.inc | 1 |
6 files changed, 65 insertions, 13 deletions
diff --git a/usr/src/man/man3c/Makefile b/usr/src/man/man3c/Makefile index 6841dc9a7c..1a50ed5fa9 100644 --- a/usr/src/man/man3c/Makefile +++ b/usr/src/man/man3c/Makefile @@ -113,6 +113,7 @@ MANFILES= __fbufsize.3c \ exit.3c \ fattach.3c \ fclose.3c \ + fcloseall.3c \ fdatasync.3c \ fdetach.3c \ fdopen.3c \ diff --git a/usr/src/man/man3c/fclose.3c b/usr/src/man/man3c/fclose.3c index dd271156f1..b3759b8883 100644 --- a/usr/src/man/man3c/fclose.3c +++ b/usr/src/man/man3c/fclose.3c @@ -19,7 +19,6 @@ fclose \- close a stream .fi .SH DESCRIPTION -.sp .LP The \fBfclose()\fR function causes the stream pointed to by \fIstream\fR to be flushed and the associated file to be closed. Any unwritten buffered data for @@ -42,12 +41,10 @@ behavior. The \fBfclose()\fR function is performed automatically for all open files upon calling \fBexit\fR(2). .SH RETURN VALUES -.sp .LP Upon successful completion, \fBfclose()\fR returns \fB0\fR. Otherwise, it returns \fBEOF\fR and sets \fBerrno\fR to indicate the error. .SH ERRORS -.sp .LP The \fBfclose()\fR function will fail if: .sp @@ -135,7 +132,6 @@ limits of the device. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -153,7 +149,7 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP \fBclose\fR(2), \fBexit\fR(2), \fBgetrlimit\fR(2), \fBulimit\fR(2), -\fBfopen\fR(3C), \fBstdio\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5) +\fBfcloseall\fR(3C), \fBfopen\fR(3C), \fBstdio\fR(3C), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3c/fcloseall.3c b/usr/src/man/man3c/fcloseall.3c new file mode 100644 index 0000000000..c1a9f49847 --- /dev/null +++ b/usr/src/man/man3c/fcloseall.3c @@ -0,0 +1,53 @@ +.\" +.\" 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 3C , +.Xr fflush 3C , +.Xr attributes 5 , +.Xr environ 5 , +.Xr standards 5 diff --git a/usr/src/man/man3c/fopen.3c b/usr/src/man/man3c/fopen.3c index 906ee3532e..7413fa58ba 100644 --- a/usr/src/man/man3c/fopen.3c +++ b/usr/src/man/man3c/fopen.3c @@ -4,7 +4,7 @@ .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. .\" Portions Copyright (c) 2013, OmniTI Computer Consulting, Inc. All Rights Reserved. -.\" Portions Copyright (c) 2013, Joyent, Inc. All Rights Reserved. +.\" Portions Copyright (c) 2014, Joyent, Inc. All Rights Reserved. .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at .\" http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. @@ -402,6 +402,7 @@ The \fBF\fR character in the \fImode\fR argument is Evolving. In all other respects this function is Standard. .SH SEE ALSO .LP -\fBenable_extended_FILE_stdio\fR(3C), \fBfclose\fR(3C), \fBfdopen\fR(3C), -\fBfflush\fR(3C), \fBfreopen\fR(3C), \fBfsetpos\fR(3C), \fBrewind\fR(3C), -\fBopen\fR(2), \fBattributes\fR(5), \fBlf64\fR(5), \fBstandards\fR(5) +\fBenable_extended_FILE_stdio\fR(3C), \fBfclose\fR(3C), +\fRfcloseall\fR(3C), \fBfdopen\fR(3C), \fBfflush\fR(3C), +\fBfreopen\fR(3C), \fBfsetpos\fR(3C), \fBrewind\fR(3C), \fBopen\fR(2), +\fBattributes\fR(5), \fBlf64\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3lib/libc.3lib b/usr/src/man/man3lib/libc.3lib index 5dd25501d6..6e5e22f798 100644 --- a/usr/src/man/man3lib/libc.3lib +++ b/usr/src/man/man3lib/libc.3lib @@ -224,9 +224,9 @@ l l . \fBfchdir\fR \fBfchmod\fR \fBfchown\fR \fBfchownat\fR \fBfchroot\fR \fBfclose\fR -\fBfcntl\fR \fBfconvert\fR -\fBfcvt\fR \fBfdatasync\fR -\fBfdetach\fR +\fBfcloseall\fR \fBfcntl\fR +\fBfconvert\fR \fBfcvt\fR +\fBfdatasync\fR \fBfdetach\fR \fBfdopen\fR \fBfdopendir\fR \fBfdwalk\fR \fBfeof\fR \fBferror\fR \fBfflush\fR diff --git a/usr/src/pkg/manifests/system-library.man3c.inc b/usr/src/pkg/manifests/system-library.man3c.inc index bac8b10985..bf8be33d69 100644 --- a/usr/src/pkg/manifests/system-library.man3c.inc +++ b/usr/src/pkg/manifests/system-library.man3c.inc @@ -109,6 +109,7 @@ file path=usr/share/man/man3c/euclen.3c file path=usr/share/man/man3c/exit.3c file path=usr/share/man/man3c/fattach.3c file path=usr/share/man/man3c/fclose.3c +file path=usr/share/man/man3c/fcloseall.3c file path=usr/share/man/man3c/fdatasync.3c file path=usr/share/man/man3c/fdetach.3c file path=usr/share/man/man3c/fdopen.3c |