Run a Command
sandbox.exec(...) to run a command in the sandbox.
Start a Background Process
Usesandbox.processes.start(...) when you need to keep a process running:
Get, List, and Signal Processes
Inspect running processes or control them later by ID:result() is a convenience alias for wait() on a process handle.
Stream Process Output
Stream stdout and stderr as server-sent events:Common Parameters
string
required
Command to run inside the sandbox.
string
Working directory for the process.
object
Environment variables to inject into the process.
number
Maximum runtime in milliseconds.
string
Run the command as a specific sandbox user, for example
root.Process Status Values
queuedrunningexitedfailedkilledtimed_out