Processes

A process is a particular instance of running a command.

This is just like in a normal operating system, except with Tangram, if the process is sandboxed, then instead of creating a new process every time you run a command, Tangram can reuse an existing process if one is available.

export default tg.command(() => {
// Sleep for ten seconds.
await tg.sleep(10);
return "Hello, World!";
});
# Spawn a process.
$ tg spawn
bld_deadbeef
# Get the process's status.
$ tg process status bld_deadbeef
started
# Wait for the process to finish and get its output.
$ tg process output bld_deadbeef
"Hello, World!"

Processes are not objects because they are mutable. Their IDs are not content addresses, they are randomly assigned.