tcsendbreak(3P) INTERACTIVE UNIX System (POSIX) tcsendbreak(3P)
NAME
tcsendbreak, tcdrain, tcflush, tcflow - line control func-
tions
SYNOPSIS
#include <termios.h>
int tcsendbreak (fildes, duration)
int fildes;
int duration;
int tcdrain (fildes)
int fildes;
int tcflush (fildes, queue_selector)
int fildes;
int queue_selector;
int tcflow (fildes, action)
int fildes;
int action;
DESCRIPTION
If the terminal is using asynchronous serial data transmis-
sion, the tcsendbreak() function causes transmission of a
continuous stream of zero-valued bits for a specific dura-
tion. If duration is zero, it causes transmission of zero-
valued bits for at least 0.25 seconds, and not more than 0.5
seconds. If duration is not zero, it sends zero-valued bits
for an implementation-defined period of time.
If the terminal is not using asynchronous serial data
transmission, it is implementation-defined whether the
tcsendbreak() function sends data to generate a break condi-
tion (as defined by the implementation) or returns without
any action.
The tcdrain() function waits until all output written to the
object referred to by fildes has been transmitted.
The tcflush() function discards data written to the object
referred to by fildes but not transmitted, or data received
but not read, depending on the value of queue_selector:
(1) If queue_selector is TCIFLUSH, it flushes data received
but not read.
(2) If queue_selector is TCOFLUSH, it flushes data written
but not transmitted.
(3) If queue_selector is TCIOFLUSH, it flushes both data
received but not read and data written but not
transmitted.
The tcflow() function suspends transmission or reception of
data on the object referred to by fildes, depending on the
value of action:
Rev. 1.1 Page 1
tcsendbreak(3P) INTERACTIVE UNIX System (POSIX) tcsendbreak(3P)
(1) If action is TCOOFF, it suspends output.
(2) If action is TCOON, it restarts suspended output.
(3) If action is TCIOFF, the system transmits a STOP char-
acter, which is intended to cause the terminal device
to stop transmitting data to the system.
(4) If action is TCION, the system transmits a START char-
acter, which is intended to cause the terminal device
to start transmitting data to the system.
The symbolic constants for the values of queue_selector and
action are defined in <termios.h>.
The default on open of a terminal file is that neither its
input nor its output is suspended.
DIAGNOSTICS
Upon successful completion, a value of zero is returned.
Otherwise, a value of -1 is returned, and errno is set to
indicate the error.
ERRORS
If any of the following conditions occur, the tcsendbreak()
function returns -1 and sets errno to the corresponding
value:
[EBADF]
The fildes argument is not a valid file descriptor.
[ENOTTY]
The file associated with fildes is not a terminal.
If any of the following conditions occur, the tcdrain()
function returns -1 and sets errno to the corresponding
value:
[EBADF]
The fildes argument is not a valid file descriptor.
[EINTR]
A signal interrupted the tcdrain() function.
[ENOTTY]
The file associated with fildes is not a terminal.
If any of the following conditions occur, the tcflush()
function shall returns -1 and sets errno to the correspond-
ing value:
[EBADF]
The fildes argument is not a valid file descriptor.
Rev. 1.1 Page 2
tcsendbreak(3P) INTERACTIVE UNIX System (POSIX) tcsendbreak(3P)
[EINVAL]
The queue_selector argument is not a proper value.
[ENOTTY]
The file associated with fildes is not a terminal.
If any of the following conditions occur, the tcflow() func-
tion returns -1 and sets errno to the corresponding value:
[EBADF]
The fildes argument is not a valid file descriptor.
[EINVAL]
The action argument is not a proper value.
[ENOTTY]
The file associated with fildes is not a terminal.
Rev. 1.1 Page 3