Documentation
¶
Overview ¶
Package sandbox wraps game/agent subprocesses with per-session isolation and resource limits (PRD §7 S2). It prefers bubblewrap, falls back to prlimit, and degrades to a plain exec with a warning.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLimits = Limits{CPUSeconds: 3600, MemoryMB: 512, MaxProcs: 64}
DefaultLimits suit a single interactive game session.
Functions ¶
This section is empty.
Types ¶
type Limits ¶
type Limits struct {
CPUSeconds int // hard CPU-time cap (fork-bomb/runaway protection)
MemoryMB int
MaxProcs int
}
Limits are per-process resource caps.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner builds sandboxed exec.Cmds.
Click to show internal directories.
Click to hide internal directories.