Add O_NOCTTY for darwin when opening slave (#93)

Same as in #9, on darwin if there is no controlling terminal then opening a terminal will set that as the controlling terminal for the process which then causes a failure when setting it on the child.
This commit is contained in:
Isao Jonas
2020-08-04 13:06:58 -05:00
committed by GitHub
parent 2a38352e8b
commit a6c0a376f1

View File

@@ -33,7 +33,7 @@ func open() (pty, tty *os.File, err error) {
return nil, nil, err
}
t, err := os.OpenFile(sname, os.O_RDWR, 0)
t, err := os.OpenFile(sname, os.O_RDWR|syscall.O_NOCTTY, 0)
if err != nil {
return nil, nil, err
}