capexec

package
v3.0.0-rc67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ReadyFDEnv = "OPENSVC_EXEC_READY_FD"

ReadyFDEnv names the variable of the descriptor a caller of Exec waits on for the command to take over: the descriptor is closed by the execve of the command, and the error is written to it when the command can not be executed. The command inherits neither the descriptor nor the variable.

It is the protocol a Go program starting a command uses with its child, one level deeper: the caller learns the command runs, in its cgroup, with its limits and its identity, without guessing a delay.

Variables

View Source
var ErrNoCommand = errors.New("a command to run is required, after --")

ErrNoCommand is the error of an exec given no command to run.

Functions

func NotReady

func NotReady(err error)

NotReady reports err on the descriptor ReadyFDEnv names, if any, to the caller waiting for the command to take over: a refusal of the arguments before Exec, as a command missing, is reported there too.

Types

type T

type T struct {
	PGID            *string
	PGCpus          *string
	PGMems          *string
	PGCPUShares     *string
	PGCPUQuota      *string
	PGCPUBurst      *string
	PGMemOOMControl *string
	PGMemLimit      *string
	PGMemHigh       *string
	PGVMemLimit     *string
	PGMemSwappiness *string
	PGBlockIOWeight *string
	PGPidsMax       *string
	LimitAS         *string
	LimitCPU        *string
	LimitCore       *string
	LimitData       *string
	LimitFSize      *string
	LimitMemLock    *string
	LimitNoFile     *string
	LimitNProc      *string
	LimitRSS        *string
	LimitStack      *string
	LimitVMem       *string
	User            *string
	Group           *string

	// Umask is the umask of the command, in octal, as 022. Not set,
	// the command inherits the one of om exec.
	Umask *string
}

func (T) Argv

func (t T) Argv() []string

func (T) Exec

func (t T) Exec(args []string)

func (*T) FlagSet

func (t *T) FlagSet(flags *pflag.FlagSet)

func (*T) LoadLimit

func (t *T) LoadLimit(g ulimit.Config)

func (*T) LoadPG

func (t *T) LoadPG(g pg.Config)

Jump to

Keyboard shortcuts

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