Index of Section 2 Manual Pages
| Interix / SUA | tcflush.2 | Interix / SUA |
tcflush(2) tcflush(2)
tcsendbreak()
NAME
tcsendbreak(), tcdrain(), tcflow(), tcflush() - line control functions
SYNOPSIS
#include
int tcdrain (int fd)
int tcflow (int fd, int action)
int tcflush (int fd, int queue_selector)
int tcsendbreak (int fd, int len)
DESCRIPTION
These functions control the terminal line, but do not directly affect the
terminal attributes (for those, see tcsetattr(2)).
The tcdrain(2) function waits until all output written to the terminal
referenced by fd has been transmitted to the terminal.
The tcflow(2) function suspends transmission of data to or the reception
of data from the terminal referenced by fd depending on the value of
action. The value of action must be one of the following:
TCOOFF
Suspend output.
TCOON
Restart suspended output.
TCIOFF
Transmit a STOP character, which is intended to cause the terminal to
stop transmitting data to the system.
TCION
Transmit a START character, which is intended to cause the terminal to
start transmitting data to the system.
The tcflush(2) function discards any data written to the terminal
referenced by fd which has not been transmitted to the terminal, or any
data received from the terminal but not yet read, depending on the value
of queue_selector. The value of queue_selector must be one of the
following:
TCIFLUSH
Flush data received but not read.
TCOFLUSH
Flush data written but not transmitted.
TCIOFLUSH
Flush both data received but not read and data written but not
transmitted.
The tcsendbreak(2) function transmits a continuous stream of zero-valued
bits for four-tenths of a second to the terminal referenced by fd.
RETURN VALUES
Upon successful completion, all of these functions return a value of zero.
If an error occurs, all of these functions return a value of -1 and set
errno
ERRORS
These functions can fail for the following reasons:
[EBADF]
The fd argument is not a valid file descriptor.
[EINVAL]
The action or queue_selector argument is not a proper value.
[ENOTTY]
The file associated with fd is not a terminal.
[EINTR]
A signal interrupted the tcdrain(2) function.
SEE ALSO
tcsetattr(2)
USAGE NOTES
All of these functions are thread safe.
All of these functions are async-signal safe.