func (c *linuxConsole) dupStdio() error {
	slave, err := c.open(syscall.O_RDWR)
	if err != nil {
		return err
	}
	fd := int(slave.Fd())
	for _, i := range []int{0, 1, 2} {
		if err := syscall.Dup3(fd, i, 0); err != nil {
			return err
		}
	}
	return nil
}
func (c *linuxConsole) dupStdio() error {
	slave, err := c.open(syscall.O_RDWR)
	if err != nil {
		return err
	}
	fd := int(slave.Fd())
	for _, i := range []int{0, 1, 2} {
		if err := syscall.Dup3(fd, i, 0); err != nil {
			return err
		}
	}
	return nil
}
func ( c * linuxConsole ) dupStdio ( ) error { slave , err := c . open ( syscall . O_RDWR ) if err != nil { return err } fd := int ( slave . Fd ( ) ) for _ , i := range [ ] int { 0 , 1 , 2 } { if err := syscall . Dup3 ( fd , i , 0 ) ; err != nil { return err } } return nil }
// dupStdio opens the slavePath for the console and dups the fds to the current
// processes stdio, fd 0,1,2.
dupStdio opens the slavePath for the console and dups the fds to the current processes stdio fd 0 1 2 .