Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

Guardian Native C Library Calls (f) f
ush(3)
NAME
fush - Flushes a stream
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <stdio.h>
int fush(
FILE *stream);
PARAMETERS
stream Species the output or update stream.
DESCRIPTION
The fush( ) function writes any buffered data for the stream specied by the stream parameter
and leaves the stream open. If stream is a null pointer, the fush() function performs this ush-
ing action on all streams for which the behavior was previously dened. The st_ctime and
st_mtime elds of the underlying le are marked for update.
RETURN VALUES
Upon successful completion, the fush( ) 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 ag is set for the le descriptor underlying stream and the
process would be delayed in the write operation.
[EBADF] The le descriptor underlying the stream parameter is not valid.
[EFBIG] An attempt was made to write a le that exceeds the processs le size limit or
the maximum le size.
[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 le.
[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-005 Hewlett-Packard Company 211