package console

import "github.com/docker/libcontainer/console"

Index

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.

Source Files

console.go

Version
v1.2.0
Published
Aug 20, 2014
Platform
linux/amd64
Imports
6 packages
Last checked
2 hours ago

Tools for package owners.