-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore support for older Go versions
When compiled with go older than 1.12 creack/pty will not include a fix for blocking Read() and will be prone to data races - but at least it will work For more information see issues: #88 #114 #156 #162
- Loading branch information
Showing
3 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
//go:build go1.12 | ||
// +build go1.12 | ||
|
||
package pty | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//go:build !windows && !go1.12 | ||
// +build !windows,!go1.12 | ||
|
||
package pty | ||
|
||
import "os" | ||
|
||
func ioctl(f *os.File, cmd, ptr uintptr) error { | ||
return ioctl_inner(f.Fd(), cmd, ptr) // fall back to blocking io (old behavior) | ||
} |