Browse code

Make sure the process start in his own session and grabs the terminal

Guillaume J. Charmes authored on 2013/04/05 03:24:22
Showing 1 changed files
... ...
@@ -202,7 +202,7 @@ func (container *Container) startPty() error {
202 202
 		container.cmd.Stdin = stdoutSlave
203 203
 		// FIXME: The following appears to be broken.
204 204
 		// "cannot set terminal process group (-1): Inappropriate ioctl for device"
205
-		// container.cmd.SysProcAttr = &syscall.SysProcAttr{Setctty: true, Setsid: true}
205
+		container.cmd.SysProcAttr = &syscall.SysProcAttr{Setctty: true, Setsid: true}
206 206
 		go func() {
207 207
 			defer container.stdin.Close()
208 208
 			Debugf("[startPty] Begin of stdin pipe")