Flush buffers
Synopsis:
#include <sys/ioctl.h>
#define TCFLSH _IOW('T', 7, int)
Arguments to ioctl():
Argument |
Value |
fd |
A file descriptor that you obtained by opening the device |
request |
TCFLSH |
Additional argument |
A pointer to an integer |
Description:
This command flushes the input and/or output stream associated with the file descriptor.
Note:
This command is for internal use, and you shouldn't use it directly.
Instead use the
tcflush()
cover function.
Input:
The queue selector; one of:
- 0 — discard all data that's received,
but not yet read, on the device associated with fildes.
- 1 —
discard all data that's written, but not yet transmitted, on
the device associated with fildes.
- 2 —
discard all data that's written, but not yet transmitted,
as well as all data that's received, but not yet read, on
the device associated with fildes.