mirror of https://github.com/liamg/aminal.git
try to fix darwin pty
This commit is contained in:
parent
25aef7599d
commit
c69664a0d4
|
@ -39,7 +39,11 @@ func open() (*os.File, *os.File, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getpt() (file *os.File, err error) {
|
func getpt() (file *os.File, err error) {
|
||||||
return os.OpenFile("/dev/ptmx", os.O_RDWR, 0)
|
f, err := os.OpenFile("/dev/ptmx", os.O_RDWR|syscall.O_CLOEXEC, 0)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return os.NewFile(uintptr(f), "/dev/ptmx"), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ptsname(file *os.File) (name string, err error) {
|
func ptsname(file *os.File) (name string, err error) {
|
||||||
|
|
Loading…
Reference in New Issue