tcflow, tcsendbreak, tcdrain, tcflush(3) | line control functions |
tcdrain, tcsendbreak, tcflow, tcflush(3) | line control functions |
tcflush, tcsendbreak, tcdrain, tcflow(3) | line control functions |
tcsendbreak, tcdrain, tcflow, tcflush(3) | line control functions |
TCSENDBREAK(3) | MidnightBSD Library Functions Manual | TCSENDBREAK(3) |
tcsendbreak
,
tcdrain
, tcflush
,
tcflow
— line control
functions
Standard C Library (libc, -lc)
#include
<termios.h>
int
tcdrain
(int
fd);
int
tcflow
(int
fd, int
action);
int
tcflush
(int
fd, int
action);
int
tcsendbreak
(int
fd, int len);
The
tcdrain
()
function waits until all output written to the terminal referenced by
fd has been transmitted to the terminal.
The
tcflow
()
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:
Input Modes
’ section of
termios(4)).Input Modes
’ section of
termios(4)).The
tcflush
()
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 action. The value of action
must be one of the following:
The
tcsendbreak
()
function transmits a continuous stream of zero-valued bits for four-tenths
of a second to the terminal referenced by fd. The
len argument is ignored in this implementation.
Upon successful completion, all of these functions return a value of zero.
If any error occurs, a value of -1 is returned and the global variable errno is set to indicate the error, as follows:
EBADF
]EINVAL
]ENOTTY
]EINTR
]tcdrain
() function.EWOULDBLOCK
]tcdrain
() function could write all buffered
output.The tcsendbreak
(),
tcflush
() and tcflow
()
functions are expected to be compliant with the IEEE Std
1003.1-1988 (“POSIX.1”) specification.
The tcdrain
() function is expected to be
compliant with IEEE Std 1003.1-1988
(“POSIX.1”) when the drain wait value is set to zero
with comcontrol(8),
or with ioctl(2)
TIOCSDRAINWAIT, or with
sysctl(8)
kern.tty_drainwait. A non-zero drain wait value can
result in tcdrain
() returning
EWOULDBLOCK without writing all output. The default
value for kern.tty_drainwait is 300 seconds.
January 11, 2017 | midnightbsd-3.1 |