github.com/kr/pty: Update to f7ee69f31298ecbe5d2b349c711e2547a617d398

Pick up the fix in Start to preserve c.SysProcAttr of the caller.

Change-Id: Ib553b1160b7832e8840df234ad82fb2f4a36ffc7
diff --git a/go/src/github.com/kr/pty/README.google b/go/src/github.com/kr/pty/README.google
index 518c602..52947dc 100644
--- a/go/src/github.com/kr/pty/README.google
+++ b/go/src/github.com/kr/pty/README.google
@@ -1,5 +1,5 @@
-URL: https://github.com/kr/pty/archive/67e2db24c831afa6c64fc17b4a143390674365ef.zip
-Version: 67e2db24c831afa6c64fc17b4a143390674365ef
+URL: https://github.com/kr/pty/archive/f7ee69f31298ecbe5d2b349c711e2547a617d398.zip
+Version: f7ee69f31298ecbe5d2b349c711e2547a617d398
 License: MIT
 License File: LICENSE
 
diff --git a/go/src/github.com/kr/pty/ioctl_linux.go b/go/src/github.com/kr/pty/ioctl_linux.go
deleted file mode 100644
index 9fe7b0b..0000000
--- a/go/src/github.com/kr/pty/ioctl_linux.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package pty
-
-// from <asm-generic/ioctl.h>
-const (
-	_IOC_NRBITS   = 8
-	_IOC_TYPEBITS = 8
-
-	_IOC_SIZEBITS = 14
-	_IOC_DIRBITS  = 2
-
-	_IOC_NRSHIFT   = 0
-	_IOC_TYPESHIFT = _IOC_NRSHIFT + _IOC_NRBITS
-	_IOC_SIZESHIFT = _IOC_TYPESHIFT + _IOC_TYPEBITS
-	_IOC_DIRSHIFT  = _IOC_SIZESHIFT + _IOC_SIZEBITS
-
-	_IOC_NONE  uint = 0
-	_IOC_WRITE uint = 1
-	_IOC_READ  uint = 2
-)
-
-func _IOC(dir uint, ioctl_type byte, nr byte, size uintptr) uintptr {
-	return (uintptr(dir)<<_IOC_DIRSHIFT |
-		uintptr(ioctl_type)<<_IOC_TYPESHIFT |
-		uintptr(nr)<<_IOC_NRSHIFT |
-		size<<_IOC_SIZESHIFT)
-}
-
-func _IO(ioctl_type byte, nr byte) uintptr {
-	return _IOC(_IOC_NONE, ioctl_type, nr, 0)
-}
-
-func _IOR(ioctl_type byte, nr byte, size uintptr) uintptr {
-	return _IOC(_IOC_READ, ioctl_type, nr, size)
-}
-
-func _IOW(ioctl_type byte, nr byte, size uintptr) uintptr {
-	return _IOC(_IOC_WRITE, ioctl_type, nr, size)
-}
-
-func _IOWR(ioctl_type byte, nr byte, size uintptr) uintptr {
-	return _IOC(_IOC_READ|_IOC_WRITE, ioctl_type, nr, size)
-}
diff --git a/go/src/github.com/kr/pty/pty_linux.go b/go/src/github.com/kr/pty/pty_linux.go
index 6e5a042..cb901a2 100644
--- a/go/src/github.com/kr/pty/pty_linux.go
+++ b/go/src/github.com/kr/pty/pty_linux.go
@@ -7,11 +7,6 @@
 	"unsafe"
 )
 
-var (
-	ioctl_TIOCGPTN   = _IOR('T', 0x30, unsafe.Sizeof(_C_uint(0))) /* Get Pty Number (of pty-mux device) */
-	ioctl_TIOCSPTLCK = _IOW('T', 0x31, unsafe.Sizeof(_C_int(0)))  /* Lock/unlock Pty */
-)
-
 func open() (pty, tty *os.File, err error) {
 	p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0)
 	if err != nil {
@@ -37,7 +32,7 @@
 
 func ptsname(f *os.File) (string, error) {
 	var n _C_uint
-	err := ioctl(f.Fd(), ioctl_TIOCGPTN, uintptr(unsafe.Pointer(&n)))
+	err := ioctl(f.Fd(), syscall.TIOCGPTN, uintptr(unsafe.Pointer(&n)))
 	if err != nil {
 		return "", err
 	}
@@ -47,5 +42,5 @@
 func unlockpt(f *os.File) error {
 	var u _C_int
 	// use TIOCSPTLCK with a zero valued arg to clear the slave pty lock
-	return ioctl(f.Fd(), ioctl_TIOCSPTLCK, uintptr(unsafe.Pointer(&u)))
+	return ioctl(f.Fd(), syscall.TIOCSPTLCK, uintptr(unsafe.Pointer(&u)))
 }
diff --git a/go/src/github.com/kr/pty/run.go b/go/src/github.com/kr/pty/run.go
index f0678d2..c2bc488 100644
--- a/go/src/github.com/kr/pty/run.go
+++ b/go/src/github.com/kr/pty/run.go
@@ -18,7 +18,11 @@
 	c.Stdout = tty
 	c.Stdin = tty
 	c.Stderr = tty
-	c.SysProcAttr = &syscall.SysProcAttr{Setctty: true, Setsid: true}
+	if c.SysProcAttr == nil {
+		c.SysProcAttr = &syscall.SysProcAttr{}
+	}
+	c.SysProcAttr.Setctty = true
+	c.SysProcAttr.Setsid = true
 	err = c.Start()
 	if err != nil {
 		pty.Close()