github.com/dolfly/pty@v1.2.1/ioctl.go (about) 1 //go:build !windows && !solaris 2 //+build !windows,!solaris 3 4 package pty 5 6 import "syscall" 7 8 const ( 9 TIOCGWINSZ = syscall.TIOCGWINSZ 10 TIOCSWINSZ = syscall.TIOCSWINSZ 11 ) 12 13 func ioctl(fd, cmd, ptr uintptr) error { 14 _, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr) 15 if e != 0 { 16 return e 17 } 18 return nil 19 }