console

package
v0.0.0-...-f3de810 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2015 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMasterAndConsole

func CreateMasterAndConsole() (*os.File, string, error)

CreateMasterAndConsole will open /dev/ptmx on the host and retreive the pts name for use as the pty slave inside the container

func Ioctl

func Ioctl(fd uintptr, flag, data uintptr) error

func OpenAndDup

func OpenAndDup(consolePath string) error

func OpenPtmx

func OpenPtmx() (*os.File, error)

OpenPtmx opens /dev/ptmx, i.e. the PTY master.

func OpenTerminal

func OpenTerminal(name string, flag int) (*os.File, error)

OpenTerminal is a clone of os.OpenFile without the O_CLOEXEC used to open the pty slave inside the container namespace

func Ptsname

func Ptsname(f *os.File) (string, error)

Ptsname retrieves the name of the first available pts for the given master.

func Setup

func Setup(rootfs, consolePath, mountLabel string) error

Setup initializes the proper /dev/console inside the rootfs path

func Unlockpt

func Unlockpt(f *os.File) error

Unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f. Unlockpt should be called before opening the slave side of a pseudoterminal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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