Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

Guardian Native C Library Calls (f) fflush(3)
NAME
fflush - Flushes a stream
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <stdio.h>
int fflush(
FILE *stream);
PARAMETERS
stream Species the output or update stream.
DESCRIPTION
The fush() function writes any buffered data for the stream specified by the stream parameter
and leaves the stream open. If stream is a null pointer, the fflush( ) function performs this flush-
ing action on all streams for which the behavior was previously defined. The st_ctime and
st_mtime fields of the underlying file are marked for update.
RETURN VALUES
Upon successful completion, the fflush( ) function returns a value of 0 (zero). Otherwise, EOF is
returned, and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the fush( ) function sets errno to the value that
corresponds to the condition.
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying stream and the
process would be delayed in the write operation.
[EBADF] The file descriptor underlying the stream parameter is not valid.
[EFBIG] The application attempted to write beyond the file offset maximum.
[EINTR] The fush() function was interrupted by a signal that was caught.
[EIO] The TOSTOP tty local mode causes a background process to get a SIGTTOU
signal if it attempts to write to the controlling terminal. The SIGTTOU signal, if
it is not caught or ignored, will cause the process to block in a stopped state. A
process in an orphaned process group is not allowed to become stopped, since
there is no unprivileged process to unblock it. This condition only applies to
operations on stdio streams associated with ttys.
[EIO] is also associated with driver errors.
[ENOSPC] There was no free space remaining on the device containing the file.
[EPIPE] An attempt is made to write to a pipe or FIFO that is not open for reading by any
process. A SIGPIPE signal will also be sent to the process.
527192-018 Hewlett-Packard Company 227