code: func ptsname(f *os.File) (string, error) {
  	var u uint32
  	if _, _, err := unix.Syscall(unix.SYS_IOCTL, f.Fd(), unix.TIOCGPTN, uintptr(unsafe.Pointer(&u))); err != 0 {
  		return "", err
  	}
  	return fmt.Sprintf("/dev/pts/%d", u), nil
  }
docs: // ptsname retrieves the name of the first available pts for the given master.