converge/cmd/tcpserver/sshserver_linux.go
Erik Brakkee 1ebee30c8c cross compilation on windows working.
pty.Start() is not supported on windows
2024-07-22 19:34:26 +02:00

13 lines
253 B
Go

package main
import (
"os"
"syscall"
"unsafe"
)
func setWinsize(f *os.File, w, h int) {
syscall.Syscall(syscall.SYS_IOCTL, f.Fd(), uintptr(syscall.TIOCSWINSZ),
uintptr(unsafe.Pointer(&struct{ h, w, x, y uint16 }{uint16(h), uint16(w), 0, 0})))
}