HomeFreeBSD

script: Minor cleanups.

Description

script: Minor cleanups.

  • Instead of using isatty() to decide whether to call tcgetattr(), just call tcgetattr() directly, since that's all that isatty() does anyway.
  • Simplify error handling in termset(). Check for errno != ENOTTY from tcgetattr() to handle errors that may be raised while running script(1) under a debugger.

PR: 248377
Submitted by: Soumendra Ganguly <soumendraganguly@gmail.com>
MFC after: 1 week

Details

Provenance
markjAuthored on Aug 11 2020, 2:19 PM
Parents
rG74d3a63559e0: Use atomic_clear_rel_long() to implement clear_bit_unlock() in the LinuxKPI
Branches
Unknown
Tags
Unknown

Event Timeline