Set Ctty in SysProcAttr (#75)
diff --git a/go.mod b/go.mod index 4a275a5..f73bcd6 100644 --- a/go.mod +++ b/go.mod
@@ -1 +1,3 @@ module github.com/kr/pty + +go 1.12
diff --git a/run.go b/run.go index 56a26ad..959be26 100644 --- a/run.go +++ b/run.go
@@ -47,6 +47,7 @@ } c.SysProcAttr.Setctty = true c.SysProcAttr.Setsid = true + c.SysProcAttr.Ctty = int(tty.Fd()) err = c.Start() if err != nil { pty.Close()