code: func ptsname(f *os.File) (string, error) {
  	n, err := unix.IoctlGetInt(int(f.Fd()), unix.TIOCPTYGNAME)
  	if err != nil {
  		return "", err
  	}
  	return fmt.Sprintf("/dev/pts/%d", n), nil
  }
docs: // ptsname retrieves the name of the first available pts for the given master.