Manual page for TCDRAIN(3P)
tcdrain, tcflow, tcflush, tcsendbreak - line control functions
int tcdrain(int fildes);
int tcflow(int fildes, int action);
int tcflush(int fildes, int queue_selector);
int tcsendbreak(int fildes, int duration);
The tcdrain function waits until all output written to the device
referred to by fildes has been transmitted.
The tcflow function controls the flow of output, and attempts
to control the flow of input, for the device referred to by
fildes. The possible values of the action argument are
the following constants defined in <termios.h>:
Suspend output from the device.
Restart suspended output from the device.
Transmit a STOP character, with the intention of stopping the
terminal from sending any data.
Transmit a START character, with the intention of telling the
terminal to restart the transmission of data.
The tcflush function discards any data written to the device
referred by fildes but not transmitted, or data received, but not
read, depending on the value of queue_selector. The possible
values of the queue_selector are the following constants defined in
Flush all data received but not yet read (input queue).
Flush all data written but not yet transmitted (output queue).
Flush both the input and output queues.
The tcsendbreak causes the transmission of a break condition - a
continuous stream of zero-valued bits. This occurs only if the file
descriptor fildes is associated with a asynchronous communications
line. The transmission lasts for 400 milliseconds.
Upon successful completion, a value of zero is returned. Otherwise a
value of -1 is returned and errno is set to indicate the error.
If any of the following conditions occur, tcdrain, tcflow,
tcflush and tcsendbreak return -1
and sets errno to the corresponding value:
The fildes argument is not a valid file descriptor.
The file associated with fildes is not a terminal.
The following error condition may apply to tcdrain:
A signal interrupted the function.
The following error condition may apply to tcflow:
The action argument is not a proper value.
The following error condition may apply to tcflush:
The queue_selector argument is not a proper value.
Created by unroff & hp-tools.
© by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97