commit | 1fb082f5698c2ea0a69bfb585d9e521a1ca7a896 | [log] [tgz] |
---|---|---|
author | Keith Rarick <kr@xph.us> | Sat Nov 03 16:17:05 2012 -0700 |
committer | Keith Rarick <kr@xph.us> | Sat Nov 03 16:17:05 2012 -0700 |
tree | aff83b290db17186dce47d1dfc5b47f86e0ee314 | |
parent | 59dd1489ccd5455720eece7f03c0c42e263fb318 [diff] |
set controlling tty for new process; closes #8
diff --git a/run.go b/run.go index f0ee0e1..f0678d2 100644 --- a/run.go +++ b/run.go
@@ -3,6 +3,7 @@ import ( "os" "os/exec" + "syscall" ) // Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, @@ -17,6 +18,7 @@ c.Stdout = tty c.Stdin = tty c.Stderr = tty + c.SysProcAttr = &syscall.SysProcAttr{Setctty: true, Setsid: true} err = c.Start() if err != nil { pty.Close()