proc

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InteractiveShell

func InteractiveShell() []string

InteractiveShell is the argv for a keep_shell session.

func ShellArgv

func ShellArgv(script string) []string

ShellArgv wraps a config script for the platform shell.

Types

type Proc

type Proc interface {
	io.ReadWriteCloser

	// Resize changes the terminal size to rows x cols.
	Resize(rows, cols int) error

	// Kill terminates the process and everything it spawned.
	Kill()

	// Wait blocks until the process exits.
	Wait() error
}

Proc is one task phase running behind a pseudo-terminal. Unix uses a pty (creack/pty); Windows uses ConPTY (go-pty).

func Start

func Start(argv []string, rows, cols int) (Proc, error)

Start runs argv behind a pty of the given size. The child is its own process group leader (via pty setsid), so Kill can signal the whole tree.

Jump to

Keyboard shortcuts

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