Documentation ¶
Overview ¶
Package sys provide convenient wrappers around syscalls.
Index ¶
- Constants
- func DumpStack() string
- func FlushInput(fd int) error
- func GetWinsize(file *os.File) (row, col int)
- func Ioctl(fd int, req uintptr, arg uintptr) error
- func IsATTY(file *os.File) bool
- func Select(nfd int, r *FdSet, w *FdSet, e *FdSet) error
- func Tcgetpgrp(fd int) (int, error)
- func Tcsetpgrp(fd int, pid int) error
- func WaitForRead(files ...*os.File) (ready []bool, err error)
- type FdSet
- type Termios
Constants ¶
View Source
const SIGWINCH = unix.SIGWINCH
SIGWINCH is the Window size change signal.
Variables ¶
This section is empty.
Functions ¶
func FlushInput ¶
FlushInput discards data written to a file descriptor but not read.
func GetWinsize ¶
GetWinsize queries the size of the terminal referenced by the given file.
func WaitForRead ¶
WaitForRead blocks until any of the given files is ready to be read. It returns a boolean array indicating which files are ready to be read and possible errors.
It is implemented with select(2) on Unix and WaitForMultipleObjects on Windows.
Types ¶
type Termios ¶
Termios represents terminal attributes.
func NewTermiosFromFd ¶
NewTermiosFromFd extracts the terminal attribute of the given file descriptor.
Click to show internal directories.
Click to hide internal directories.