Documentation
¶
Overview ¶
Package isolatedprocess starts every program that reads outsider bytes. Each such program runs in an empty directory of its own, with an environment of PATH, HOME, TMPDIR and LANG alone, and inherits no credential of the worker. A program that needs a login of its own, as claude does, names the variables that carry it, and inherits those alone. A worker that runs one has called worker.MarkUndumpable, so the program cannot read the worker's own environment through /proc either.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct {
Path string
Args []string
// Files are written into the run's directory before it starts, each
// under its name, so Args can name them by a relative path.
Files map[string]string
Stdin io.Reader
// Stdout reads the program's stdout while it runs. A read that fails
// kills the run, and Run answers the read's error. Nil discards stdout.
Stdout func(io.Reader) error
// Inherit names the variables of this process's environment that the
// run keeps, each a name or a prefix ending in *, such as ANTHROPIC_*.
// Each replaces the run's own value, so inheriting HOME runs the program
// with this process's home rather than the run's directory.
Inherit []string
// Env holds entries set last, each NAME=value, over every other.
Env []string
}
Command is one run of a program.