mirror of
https://github.com/yudai/gotty.git
synced 2026-02-25 17:34:08 +01:00
updated vendored kr/pty to the current master + Solaris support:
https://github.com/kr/pty/pull/64
This commit is contained in:
parent
a080c85cbc
commit
5c2242422a
18 changed files with 510 additions and 26 deletions
9
vendor/github.com/kr/pty/pty_linux.go
generated
vendored
9
vendor/github.com/kr/pty/pty_linux.go
generated
vendored
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue