tcflush()

flush terminal data 

Function


SYNOPSIS

#include <termios.h>

int tcflush(int fildes, int queue_selector);


DESCRIPTION

Upon successful completion, tcflush() discards any data written to the specified file descriptor but that has not been transmitted, or data that has been received but not read, depending upon the value of queue_selector.


PARAMETERS

fildes 

Is the file descriptor, which must refer to a terminal.

queue_selector 

Is one of the following constants: TCIFLUSH (flush data received but not read), TCOFLUSH (flush data written but not transmitted), or TCIOFLUSH (flush both).


RETURN VALUES

If successful, tcflush() returns a value of zero. Otherwise, it returns -1 and sets errno to one of the following values:

EBADF 

The fildes parameter is not a valid file descriptor.

EINVAL 

The queue_selector parameter is not a proper value.

ENOTTY 

The file associated with fildes is not a terminal.


CONFORMANCE

POSIX.1 (1996).


MULTITHREAD SAFETY LEVEL

Async-signal-safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
ioctl(), tcdrain(), tcflow(), tcsendbreak()

Miscellaneous:
struct termios


PTC MKS Toolkit 10.4 Documentation Build 39.