TCFLOW(3) BSD TCFLOW(3)
NAME
tcflow - Suspend or restart the transmission or reception of data
SYNOPSIS
#include <termios.h>
int tcflow (filedes, action)
int filedes;
int action;
DESCRIPTION
The tcflow function suspends transmission or reception of data on the
object referred to by the filedes argument, depending on the value of the
action argument, as follows:
Value Action
TCOOFF Suspend output.
TCOON Restart output.
TCIOFF Transmit a STOP character, which is intended to cause the
terminal device to stop transmitting data to the system.
TCION Transmit a START character, which is intended to cause the
terminal device to start transmitting data to the system.
The filedes argument specifies an open file descriptor associated with a
terminal.
The default on the opening of a terminal file is that neither its input
or output are suspended.
Attempts to use the tcflow function from a process that is a member of a
background process group on a filedes associated with its controlling
terminal causes the process group to be sent a SIGTTOU signal. If the
calling process is blocking or ignoring SIGTTOU signals, the process is
allowed to perform the operation and no signal is sent.
DIAGNOSTICS
Upon successful completion, a value of 0 (zero) is returned. Otherwise, a
value of -1 is returned and errno is set to indicate the error.
ERRORS
If the tcflow() function fails, errno will be set to one of the following
values:
[EBADF] The filedes argument does not specify a valid file descriptor.
[EINVAL] The action argument is not a supported value.
[ENOTTY] The file associated with the filedes argument is not a
terminal.
SEE ALSO
tcdrain(3), tcflush(3), tcsendbreak(3) termios(4)