termios_setattr#

Apply the POSIX::Termios settings to $fd.

Synopsis#

use POSIX qw(TCSANOW TCSADRAIN);
$t->setattr(fileno(STDIN), TCSANOW);

What you get back#

"0 but true" on success, undef on failure. $fd defaults to 0, $optional_actions defaults to TCSANOW (apply immediately).

Edge cases#

  • Negative $optional_actions sets $! to EINVAL.

Differences from upstream#

Fully compatible with upstream POSIX.