A handle that corresponds to a spawned process.
An exception that signals a problem with starting or waiting for a process.
Manipulates environment variables using an associative-array-like interface.
Flags that can be passed to pipeProcess and pipeShell to specify which of the child process' standard streams are redirected. Use bitwise OR to combine flags.
Start up the browser and set it to viewing the page at url.
Escapes an argv-style argument array to be used with spawnShell, pipeShell or executeShell.
Escapes a filename to be used for shell redirection with spawnShell, pipeShell or executeShell.
Quotes a command-line argument in a manner conforming to the behavior of CommandLineToArgvW.
Executes the given program or shell command and returns its exit code and output.
Replaces the current process by executing a command, pathname, with the arguments in argv.
Attempts to terminate the process associated with pid.
Creates a unidirectional pipe.
Starts a new process, creating pipes to redirect its standard input, output and/or error streams.
Returns the process ID of the current thread, which is guaranteed to be unique within the current process.
A variation on spawnProcess that runs the given command through the current user's preferred command interpreter (aka. shell).
A non-blocking version of wait.
Waits for the process associated with pid to terminate, and returns its exit status.
Waits until either the process associated with pid terminates or the elapsed time exceeds the given timeout.
The platform-specific native shell path.
Returns the process ID of the current process, which is guaranteed to be unique on the system.
Returns the process ID of the current thread, which is guaranteed to be unique within the current process.
Determines the path to the current user's preferred command interpreter.
Options that control the behaviour of process creation functions in this module. Most options only apply to spawnProcess and spawnShell.
An interface to a pipe created by the pipe function.
Object which contains std.stdio.File handles that allow communication with a child process through its standard streams.
The following table compactly summarises the different process creation functions and how they relate to each other:
Runs program directly | Runs shell command | |
---|---|---|
Low-level process creation | spawnProcess | spawnShell |
Automatic input/output redirection using pipes | pipeProcess | pipeShell |
Execute and wait for completion, collect output | execute | executeShell |
Copyright (c) 2013, the authors. All rights reserved.
Functions for starting and interacting with other processes, and for working with the current process' execution environment.