From a6c0a376f1d083f0ced41ae7bb811497b432f3cd Mon Sep 17 00:00:00 2001 From: Isao Jonas Date: Tue, 4 Aug 2020 13:06:58 -0500 Subject: [PATCH] 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. --- pty_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pty_darwin.go b/pty_darwin.go index 6344b6b..0ed4325 100644 --- a/pty_darwin.go +++ b/pty_darwin.go @@ -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 }