Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

tcflow - suspend or restart data transmission

&pagelevel(4)&pagelevel

Syntax

#include <termios.h>

int tcflow(int fildes, int action);

Description

tcflow() suspends transmission or reception of data on the object referred to by fildes, depending on the value of action. The fildes argument is a file descriptor associated with a terminal.

If action is TCOOFF, output is suspended. If action is TCOON, suspended output is restarted.
If action is TCIOFF, input is stopped by transmitting a STOP character, and if action is TCION, input is restarted by transmitting a START character.

The default on the opening of a terminal file is that neither its input nor its output are suspended.

Attempts to use tcflow() from a process which is a member of a background process group on a fildes associated with its controlling terminal, will cause 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 SIGTTOU signal is sent.

Extension
All values are supported for connections with a remote processor. (End)

Return val.

0

-1

if successful.

if an error occurs. errno is set to indicate the error.

Errors

tcflow() will fail if:

 

EBADF

fildes is not a valid file descriptor.

 

EINVAL

action is not a supported value.

 

Extension


 

EINVAL

An attempt was made to access a BS2000 file. (End)

 

EIO

The process group of the writing process is orphaned, and the writing process is not ignoring or blocking SIGTTOU.

 

ENOTTY

The file associated with fildes is not a terminal.


Notes

tcflow() has no effect on block-mode terminals.

See also

tcsendbreak(), termios.h, unistd.h, section “General terminal interface”.