Documentation ¶
Overview ¶
Package sys provide convenient wrappers around syscalls.
Index ¶
- func DumpStack() string
- func Fcntl(fd int, cmd int, arg int) (val int, err error)
- func FlushInput(fd int) error
- func GetNonblock(fd int) (bool, error)
- func GetWinsize(fd int) (row, col int)
- func Ioctl(fd int, req int, arg uintptr) error
- func IsATTY(fd int) bool
- func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *syscall.Timeval) error
- func SelectRead(files ...*os.File) (ready []bool, err error)
- func SetNonblock(fd int, nonblock bool) error
- func Tcsetpgrp(fd int, pid int) error
- type FdSet
- type Termios
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlushInput ¶
FlushInput discards data written to a file descriptor but not read.
func GetNonblock ¶
func GetWinsize ¶
GetWinsize queries the size of the terminal referenced by the given file descriptor.
func SelectRead ¶
SelectRead 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.
func SetNonblock ¶
Types ¶
type Termios ¶
type Termios C.struct_termios
Termios represents terminal attributes.
func NewTermiosFromFd ¶
NewTermiosFromFd extracts the terminal attribute of the given file descriptor.
func (*Termios) FromFd ¶
FromFd fills term with the terminal attribute of the given file descriptor.
Click to show internal directories.
Click to hide internal directories.