Documentation
¶
Overview ¶
Package process provides subprocess execution primitives.
This extension is NOT included in the Console profile. Embedders must opt in explicitly with WithExtension(process.Extension) or use WithProfile(KitchenSink).
Two security actions gate process creation:
- security.ActionExec gates process-spawn (structured, no shell)
- security.ActionExecShell gates system (shell command string)
Both use security.ResourceProcess with the command as target.
Shell Execution ¶
- system
Structured Process Control ¶
- process-spawn, process-wait, process-kill
- process-stdout, process-stderr, process-stdin
Process Predicates ¶
- process?
Use Extension or AddToRegistry to register all primitives.
Index ¶
- Variables
- func PrimProcessKill(mc machine.CallContext) error
- func PrimProcessQ(mc machine.CallContext) error
- func PrimProcessSpawn(mc machine.CallContext) error
- func PrimProcessStderr(mc machine.CallContext) error
- func PrimProcessStdin(mc machine.CallContext) error
- func PrimProcessStdout(mc machine.CallContext) error
- func PrimProcessWait(mc machine.CallContext) error
- func PrimSystem(mc machine.CallContext) error
Constants ¶
This section is empty.
Variables ¶
var AddToRegistry = Builder.AddToRegistry
AddToRegistry registers all process primitives.
var Builder = registry.NewRegistryBuilder(addPrimitives)
Builder aggregates all process registration functions.
var Extension = registry.NewDescribedExtension("process", "OS processes: command execution, exit, environment variables.", AddToRegistry)
Extension is the process execution extension.
Functions ¶
func PrimProcessKill ¶
func PrimProcessKill(mc machine.CallContext) error
PrimProcessKill implements the (process-kill) primitive. Sends a signal to the process. Signal is a symbol: term, kill, int, hup.
func PrimProcessQ ¶
func PrimProcessQ(mc machine.CallContext) error
PrimProcessQ implements the (process?) predicate.
func PrimProcessSpawn ¶
func PrimProcessSpawn(mc machine.CallContext) error
PrimProcessSpawn implements the (process-spawn) primitive. Creates a subprocess with stdin/stdout/stderr pipes.
func PrimProcessStderr ¶
func PrimProcessStderr(mc machine.CallContext) error
PrimProcessStderr implements the (process-stderr) primitive.
func PrimProcessStdin ¶
func PrimProcessStdin(mc machine.CallContext) error
PrimProcessStdin implements the (process-stdin) primitive.
func PrimProcessStdout ¶
func PrimProcessStdout(mc machine.CallContext) error
PrimProcessStdout implements the (process-stdout) primitive.
func PrimProcessWait ¶
func PrimProcessWait(mc machine.CallContext) error
PrimProcessWait implements the (process-wait) primitive. Blocks until the process exits and returns the exit code.
func PrimSystem ¶
func PrimSystem(mc machine.CallContext) error
PrimSystem implements the (system) primitive. Runs a shell command via /bin/sh -c and returns the exit code.
Types ¶
This section is empty.