COHERENT manpages
This page displays the COHERENT manpage for tcflush() [Flush data being exchanged with a terminal].
List of available manpages
Index
tcflush() -- termios Macro (termios.h)
Flush data being exchanged with a terminal
#include <termios.h>
int tcflush (fd, queue_selector)
int fd;
int queue_selector;
The termios macro tcflush() discards, or ``flushes,'' data send to or
received from the terminal device described by the file descriptor fd.
queue_selector indicates what to do, as follows:
TCIFLUSH
Flush data received but not read.
TCOFLUSH
Flush data written but not transmitted.
TCIOFLUSH
Flush both data written and data read.
These constants are defined in header file <termios.h>.
If all goes well, tcflush() returns zero. If something goes wrong, it
returns -1 and sets errno to an appropriate value, as follows:
EBADF
fd is not a valid file descriptor.
EINVAL
queue_selector is not a proper value.
ENOTTY
fd does not describe a terminal device.
See Also
termios
POSIX Standard, §7.2.2






