tcflush#

Discard buffered input, output, or both on terminal $fd.

Synopsis#

use POSIX qw(tcflush TCIFLUSH TCOFLUSH TCIOFLUSH);
tcflush($fd, TCIOFLUSH);   # drop pending input and output

What you get back#

"0 but true" on success, undef on failure. Negative $queue_selector sets $! to EINVAL.

Differences from upstream#

Fully compatible with upstream POSIX.