lxd: github.com/lxc/lxd/shared/termios Index | Files

package termios

import "github.com/lxc/lxd/shared/termios"

Index

Package Files

cgo.go termios.go termios_linux.go termios_unix.go

func GetSize Uses

func GetSize(fd int) (int, int, error)

GetSize returns the dimensions of the given terminal.

func IsTerminal Uses

func IsTerminal(fd int) bool

IsTerminal returns true if the given file descriptor is a terminal.

func Restore Uses

func Restore(fd int, state *State) error

Restore restores the terminal connected to the given file descriptor to a previous state.

type State Uses

type State struct {
    Termios unix.Termios
}

State contains the state of a terminal.

func GetState Uses

func GetState(fd int) (*State, error)

GetState returns the current state of a terminal which may be useful to restore the terminal after a signal.

func MakeRaw Uses

func MakeRaw(fd int) (*State, error)

MakeRaw put the terminal connected to the given file descriptor into raw mode and returns the previous state of the terminal so that it can be restored.

Package termios imports 4 packages (graph) and is imported by 19 packages. Updated 2019-10-23. Refresh now. Tools for package owners.