Process.execute

Execute a process using the command line arguments as parameters to this method.

Once the process is executed successfully, its input and output can be manipulated through the stdin, stdout and stderr member PipeConduit's.

This also clears the copyEnv flag

More...
  1. void execute(const(char)[] arg1, const(char[])[] args)
  2. void execute(const(char)[] command, const(char[])[const(char)[]] env)
    class Process
    deprecated
    void
    execute
    (
    const(char)[] command
    ,
    const(char[])[const(char)[]] env
    )
  3. void execute(const(char[])[] args, const(char[])[char[]] env)
  4. Process execute()

Parameters

command const(char)[]

string with the process' command line; arguments that have embedded whitespace must be enclosed in inside double-quotes (").

env const(char[])[const(char)[]]

associative array of strings with the process' environment variables; the variable name must be the key of each entry.

Detailed Description

Deprecated: use properties or the constructor to set these parameters instead.

Throws

ProcessCreateException if the process could not be created successfully; ProcessForkException if the call to the fork() system call failed (on POSIX-compatible platforms).

Remarks: The process must not be running and the provided list of arguments must not be empty. If there was any argument already present in the args member, they will be replaced by the arguments supplied to the method.

Meta