process

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCleanup = errors.New("execution cleanup could not be confirmed")

ErrCleanup means execution cleanup was not confirmed. It must remain visible even when a cancellation also occurred; callers must suspend further turns.

Functions

func CheckContainerMounts

func CheckContainerMounts(workspace, state string, writable bool) error

func Configure

func Configure(cmd *exec.Cmd)

func OwnContainer

func OwnContainer(owner containerapi.Owner) (func() error, error)

OwnContainer starts an independent host guardian before the create request. Closing its private pipe (also on controller death) triggers verified cleanup. The workload guardian additionally prevents a delayed start after owner loss.

func ReadCompletion

func ReadCompletion(path, token string) error

func RunContainerWorkload

func RunContainerWorkload(ctx context.Context, path, token string, argv []string) (int, error)

RunContainerWorkload requires a changing controller lifetime record before effects. A frozen record cannot start work after VM/runtime recovery. While running, the monotonic local deadline avoids host/VM wall-clock assumptions.

func Supervise

func Supervise(cmd *exec.Cmd) (func(), error)

Supervise wraps a not-yet-started command. Call cleanup after Wait/Run, even when Start fails. The original command's streams, directory and environment are preserved; no shell interprets its arguments.

func SuperviseWithCleanup

func SuperviseWithCleanup(cmd *exec.Cmd, cleanupArgs []string) (func(), error)

func SuperviseWithOptions

func SuperviseWithOptions(cmd *exec.Cmd, options SupervisionOptions) (func(), error)

Types

type Completion

type Completion struct {
	Token   string `json:"token"`
	Cleaned bool   `json:"cleaned"`
	Error   string `json:"error,omitempty"`
}

type SupervisionOptions

type SupervisionOptions struct {
	// InheritDescriptors explicitly forwards contiguous descriptors starting at fd3.
	InheritDescriptors []int
	Cleanup            []string
	CompletionPath     string
	Token              string
}

Jump to

Keyboard shortcuts

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