NAME
fflush - flush a stream
SYNOPSIS
#include <stdio.h> int fflush(FILE *stream);
DESCRIPTION
For output streams, fflush() forces a write of all user-space buffered data for the given output or update stream via the stream's underlying write function. For input streams associated with seekable files (e.g., disk files, but not pipes or terminals), fflush() discards any buffered data that has been fetched from the underlying file, but has not been consumed by the application. The open status of the stream is unaffected. If the stream argument is NULL, fflush() flushes all open output streams. For a nonlocking counterpart, see unlocked_stdio(3).
RETURN VALUE
Upon successful completion 0 is returned. Otherwise, EOF is returned and errno is set to indicate the error.
ERRORS
EBADF stream is not an open stream, or is not open for writing. The function fflush() may also fail and set errno for any of the errors specified for write(2).
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). Interface Attribute Value fflush() Thread safety MT-Safe
CONFORMING TO
C89, C99, POSIX.1-2001, POSIX.1-2008. POSIX.1-2001 did not specify the behavior for flushing of input streams, but the behavior is specified in POSIX.1-2008.
NOTES
Note that fflush() flushes only the user-space buffers provided by the C library. To ensure that the data is physically stored on disk the kernel buffers must be flushed too, for example, with sync(2) or fsync(2).
SEE ALSO
fsync(2), sync(2), write(2), fclose(3), fileno(3), fopen(3), setbuf(3), unlocked_stdio(3)
COLOPHON
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
More Linux Commands
manpages/trunc.3.html
trunc(3) - round to integer, toward zero - Linux man page...
These functions round x to the nearest integer not larger in absolute value. RETURN VALUE These functions return the rounded integer value. If x is integral, in
manpages/svnmucc.1.html
svnmucc(1) Multiple URL Command Client for Subversion.......
svnmucc.1 - Subversion is a version control system, which allows you to keep old versions of files and directories (usually source code), keep a log of who, whe
manpages/SDL_GetMouseState.3.html
SDL_GetMouseState(3) - Retrieve the current state of the mou
The current button state is returned as a button bitmask, which can be tested using the SDL_BUTTON(X) macros, and x and y are set to the current mouse cursor po
manpages/wineboot.1.html
wineboot(1) - perform Wine initialization, startup, and shut
wineboot performs the initial creation and setup of a WINEPREFIX for wine(1). It can also perform a simulated reboot or shutdown to any applications running wit
manpages/getresuid.2.html
getresuid(2) - get real, effective and saved user/group IDs
getresuid() returns the real UID, the effective UID, and the saved set-user-ID of the calling process, in the arguments ruid, euid, and suid, respectively. getr
manpages/grub2-mknetdir.1.html
grub2-mknetdir(1) prepare a GRUB netboot directory..........
--compress[=no,xz,gz,lzo] compress GRUB files [optional] -d, --directory=DIR use images and modules under DIR [default=/usr/lib/grub2/<platform>] --fonts=FONTS
manpages/gnutls_pkcs11_token_set_pin.3.html
gnutls_pkcs11_token_set_pin(3) - API function (Man Page)....
This function will modify or set a users PIN for the given token. If it is called to set a user pin for first time the oldpin must be NULL. RETURNS On success,
manpages/startproc.8.html
startproc(8) - Start processes identified by path name......
startproc and the LSB variant start_daemon check for all processes of the specified executable and starts it if no processes are found. Note that startproc is d
manpages/Module::Build::Platform::VOS.3pm.html
Module::Build::Platform::VOS(3pm) - Builder class for VOS pl
Module::Build::Platform::VOS.3pm - The sole purpose of this module is to inherit from Module::Build::Base. Please see the Module::Build for the docs. AUTHOR Ken
manpages/git-cat-file.1.html
git-cat-file(1) - Provide content or type and size informati
In its first form, the command provides the content or the type of an object in the repository. The type is required unless -t or -p is used to find the object
manpages/index.1.html
index(1) - netpbm library overview - Linux manual page......
Netpbm is a package of graphics programs and a programming library. There are over 220 separate programs in the package, most of which have pbm, pgm, ......
manpages/spufs.7.html
spufs(7) - SPU file system (Miscellaneous - Linux man page)
The SPU filesystem is used on PowerPC machines that implement the Cell Broadband Engine Architecture in order to access Synergistic Processor Units (SPUs). The
