Help us shape the future of Go! Take the 2026 Go Developer Survey

execguard

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package execguard ties the processes lerd starts in a container to the run that started them. podman exec leaves them running when its caller dies or gives up, so a test run cut short keeps its browser busy for good.

Index

Constants

View Source
const MarkerEnv = "LERD_EXEC"

MarkerEnv is set on every guarded exec; children inherit it, so it finds the whole tree, Chromium processes that start their own group included.

Variables

This section is empty.

Functions

func Kill

func Kill(container string, markers ...string)

Kill ends every process in container that carries one of markers.

func Run

func Run(ctx context.Context, cmd *exec.Cmd, container string) error

Run runs cmd, a podman exec into container, under a marker of its own, killed when ctx ends or lerd is interrupted and left to Sweep otherwise. Any other cmd runs on this machine in a process group of its own, see runHost.

func Sweep

func Sweep()

Sweep kills what finished runs, and runs whose lerd no longer exists, left in their containers, one exec per container, and drops their records. A container that is gone took its processes with it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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