Skip to main content

Module process

Module process 

Source
Expand description

process: the run’s own arguments, its exit status, and filtered subprocesses.

The Language Card lists the process among the operations that are typed Host APIs rather than ambient authority, and the reason is sharpest here: a program that can start any other program has every authority the machine has, whatever the rest of its grants say. So run is filtered rather than merely granted. Process::real takes the executables a run may start from the host and refuses everything else, including a bare name that would otherwise be looked up in PATH — searching PATH is exactly the ambient authority Cove does not have. A host that names no executables has a process that cannot start one, which is the default the CLI uses.

Process::recorded is the fake. It answers run from a table of canned output rather than starting anything, and it writes the exit code into a ProcessLog instead of ending the process, so a test can observe what a program asked the host to do without the host doing it.

Structs§

Process
process: the arguments a run was given, its exit status, and the executables the host allows it to start.
ProcessLog
What a program asked a fake process to do, shared between the host and whoever inspects it.