Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > T

tccontrol(3C)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

tcsendbreak(), tcdrain(), tcflush(), tcflow() — tty line control functions

SYNOPSIS

#include <termios.h>

int tcsendbreak(int fildes, int duration);

int tcdrain(int fildes);

int tcflush(int fildes, int queue_selector);

int tcflow(int fildes, int action);

DESCRIPTION

If the terminal is using asynchronous serial data transmission, tcsendbreak() causes transmission of a continuous stream of zero-valued bits for a specific duration. If duration is zero, it causes transmission of zero-valued bits for at least 0.25 seconds, but not more than 0.5 seconds. If duration is not zero, zero-valued bits are not transmitted.

tcdrain() waits until all output written to fildes has been transmitted.

tcflush() discards data written to fildes but not transmitted, or data received but not read, depending on the value of queue_selector:

  • If queue_selector is TCIFLUSH, data received but not read is flushed.

  • If queue_selector is TCOFLUSH, data written but not transmitted is flushed.

  • If queue_selector is TCIOFLUSH, both data received but not read, and data written but not transmitted is flushed.

tcflow() suspends transmission of data to fildes or reception of data from fildes, depending on the value of action:

  • If action is TCOOFF, output is suspended.

  • If action is TCOON, suspended output is restarted.

  • If action is TCIOFF, a STOP character is transmitted which is intended to cause the terminal to stop transmitting data to the system.

  • If action is TCION, a START character is transmitted which is intended to cause the terminal to start transmitting data to the system.

RETURN VALUE

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

These functions fail if one or more of the following is true:

[EBADF]

fildes is not a valid file descriptor.

[EINTR]

A signal was received during tcdrain().

[EINVAL]

The queue_selector or the action argument is not a proper value.

[ENOTTY]

The file associated with fildes is not a terminal.

STANDARDS CONFORMANCE

tcdrain(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1

tcflow(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1

tcflush(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1

tcsendbreak(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.