func ptsname(f *os.File) (string, error) {
	ptm, err := unix.IoctlGetPtmget(int(f.Fd()), unix.TIOCPTSNAME)
	if err != nil {
		return "", err
	}
	return string(ptm.Sn[:bytes.IndexByte(ptm.Sn[:], 0)]), nil
}
ptsname retrieves the name of the first available pts for the given master.
package console
import (
	"bytes"
	"os"
	"golang.org/x/sys/unix"
)
const (
	cmdTcGet = unix.TIOCGETA
	cmdTcSet = unix.TIOCSETA
)
func unlockpt(f *os.File) error {
	return nil
}