updated vendored kr/pty to the current master + Solaris support:

https://github.com/kr/pty/pull/64
This commit is contained in:
Fazal Majid 2018-12-27 17:28:06 -08:00
parent a080c85cbc
commit 5c2242422a
18 changed files with 510 additions and 26 deletions

View file

@ -12,14 +12,19 @@ func open() (pty, tty *os.File, err error) {
if err != nil {
return nil, nil, err
}
// In case of error after this point, make sure we close the ptmx fd.
defer func() {
if err != nil {
_ = p.Close() // Best effort.
}
}()
sname, err := ptsname(p)
if err != nil {
return nil, nil, err
}
err = unlockpt(p)
if err != nil {
if err := unlockpt(p); err != nil {
return nil, nil, err
}