eunix

package
v0.0.0-...-91dc524 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package eunix provides extra UNIX-specific system utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tcsetpgrp

func Tcsetpgrp(fd int, pid int) error

Tcsetpgrp sets the terminal foreground process group.

func WaitForRead

func WaitForRead(timeout time.Duration, files ...*os.File) (ready []bool, err error)

WaitForRead blocks until any of the given files is ready to be read or timeout. A negative timeout means no timeout. It returns a boolean array indicating which files are ready to be read and any possible error.

Types

type Termios

type Termios unix.Termios

Termios represents terminal attributes.

func TermiosForFd

func TermiosForFd(fd int) (*Termios, error)

TermiosForFd returns a pointer to a Termios structure if the file descriptor is open on a terminal device.

func (*Termios) ApplyToFd

func (term *Termios) ApplyToFd(fd int) error

ApplyToFd applies term to the given file descriptor.

func (*Termios) Copy

func (term *Termios) Copy() *Termios

Copy returns a copy of term.

func (*Termios) SetEcho

func (term *Termios) SetEcho(v bool)

SetEcho sets the echo flag.

func (*Termios) SetICRNL

func (term *Termios) SetICRNL(v bool)

SetICRNL sets the CRNL iflag bit

func (*Termios) SetICanon

func (term *Termios) SetICanon(v bool)

SetICanon sets the canonical flag.

func (*Termios) SetIExten

func (term *Termios) SetIExten(v bool)

SetIExten sets the iexten flag.

func (*Termios) SetVMin

func (term *Termios) SetVMin(v uint8)

SetVMin sets the minimal number of characters for noncanonical read.

func (*Termios) SetVTime

func (term *Termios) SetVTime(v uint8)

SetVTime sets the timeout in deciseconds for noncanonical read.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL