go-judge/cmd/executorserver/grpc_executor/grpc_unix.go
criyle 78bb4d85de filestore: use /dev/shm instead of memory as file storage
- increase default tmpfs size to 128M
- add /config to get file store path
- remove memory only file store

close #20
2021-09-19 15:47:24 -07:00

22 lines
415 B
Go

//go:build linux || darwin
// +build linux darwin
package grpcexecutor
import (
"os"
"github.com/creack/pty"
"github.com/criyle/go-judge/pb"
)
func setWinsize(f *os.File, i *pb.StreamRequest_ExecResize) error {
winSize := &pty.Winsize{
Rows: uint16(i.ExecResize.Rows),
Cols: uint16(i.ExecResize.Cols),
X: uint16(i.ExecResize.X),
Y: uint16(i.ExecResize.Y),
}
return pty.Setsize(f, winSize)
}