pkg / term

Package term manages POSIX terminals.
BSD 2-Clause "Simplified" License
393 stars 64 forks source link

Fix for issue #68: Avoid leaking FD, in case of error #69

Closed stephan57160 closed 2 years ago

stephan57160 commented 2 years ago

Almost the same fix than a former fix in termios/pty.go

When xx.Open() succeeds, ensure FD is closed, when an error is detected with other treatments.

Fix applied in term_open_posix.go and term_solaris.go