tcflush3
Discard pending data
Usage
#include <termios.h>
int tcflush(int fd, int queue_selector);
Library
Standard C library (libc, -lc)
Overview
tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:
TCIFLUSH
|
flushes data received but not read. |
|---|---|
TCOFLUSH
|
flushes data written but not transmitted. |
TCIOFLUSH
|
flushes both data received but not read, and data written but not transmitted. |
Return value
|
on success. |
|---|---|
|
on failure and set errno to indicate the error. |
Attributes
For an explanation of the terms used in this section, see attributes(7).
| Interface | Attribute | Value |
| tcflush() | Thread safety | MT-Safe |
Releases
19 releases since Debian 1.1 (Buzz); the text changed 15 times.