A running program is a process. A process spawned from another process is known as a child process. Child processes terminate along with their parent.
This module allow you to spawn child processes.
This value represents the permission to spawn child processes.
Only code you trust should have access to this value.
ChildProcess subsystem, which gains you the permission to
spawn child processes.
Options to customize the execution of a child process.
shellis the shell to run the process in (if any)
workingDirectoryspecifies the working directory of the process
environmentVariablesspecifies the environment variables the process has access to
maximumBytesWrittenToStreamsspecifies an upper bound of bytes that can be returned from the process
runDurationspecifies a maximum amount of time a process is allowed to run before exiting
A nice default set of options for the
Which shell should the child process run in?
NoShellexecutes the process directly, without any shell. A little bit more efficient, but you lose some convinience as shell behaviour (like glob patterns) isn't available for arguments
DefaultShellexecutes the process in the default shell for the currently running system
CustomShellexecutes the process in the specified shell.
What should be the working directory of the process?
InheritWorkingDirectoryinherits the working directory from its parent
SetWorkingDirectorysets the working directory to the specified value (doesn't affect parent)
What should be the environment variables of the process?
InheritEnvironmentVariablesinherits the environment variables from its parent
MergeWithEnvironmentVariablesinherits the environment variables from its parent, with the specified modifications
ReplaceEnvironmentVariablessets the environment variables to the specified dictionary
How long is the process allowed to run before it's forcefully terminated?
NoLimitmeans it can run forever
Millisecondssets the limit to the specified number of milliseconds
Return value when a process terminates due to an error
The exit code provides some hint of what went wrong, but what it means depends on the program which was run.
Return value when a process terminates without error
Spawn a process with a given name, arguments and options, and wait for it to terminate.
run permission "cat" [ "my_file" ] defaultRunOptions
run, but with
defaultRunOptions passed in as options.