[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

tcflow Subroutine

Purpose

Performs flow control functions.

Library

Standard C Library (libc.a)

Syntax

#include <termios.h>
int tcflow(FileDescriptorAction)
int FileDescriptor;
int Action;

Description

The tcflow subroutine suspends transmission or reception of data on the object referred to by the FileDescriptor parameter, depending on the value of the Action parameter.

Parameters

FileDescriptor Specifies an open file descriptor.
Action Specifies one of the following:
TCOOFF Suspend output.
TCOON Restart suspended output.
TCIOFF Transmit a STOP character, which is intended to cause the terminal device to stop transmitting data to the system. See the description of IXOFF in the Input Modes section of the termios.h file.
TCION Transmit a START character, which is intended to cause the terminal device to start transmitting data to the system. See the description of IXOFF in the Input Modes section of the termios.h file.

Return Values

Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.

Error Codes

The tcflow subroutine is unsuccessful if one of the following is true:

EBADF The FileDescriptor parameter does not specify a valid file descriptor.
EINVAL The Action parameter does not specify a proper value.
EIO The process group of the writing process is orphaned, and the writing process does not ignore or block the SIGTTOU signal.
ENOTTY The file associated with the FileDescriptor parameter is not a terminal.

Example

To restart output from a terminal device, enter:

rc = tcflow(stdout, TCION);

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The tcdrain subroutine, tcflush subroutine, tcsendbreak subroutine.

The Input and Output Handling Programmer's Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]