Process.this

Constructor.

  1. this(const(char[])[] args)
  2. this(bool copyEnv, const(char[])[] args)
  3. this(const(char)[] command, const(char[])[char[]] env)
    class Process
    this
    (
    const(char)[] command
    ,
    const(char[])[char[]] env
    )
  4. this(const(char[])[] args, const(char[])[char[]] env)

Parameters

command const(char)[]

string with the process' command line; arguments that have embedded whitespace must be enclosed in inside double-quotes ("). Note: The class will use only slices, .dup when necessary.

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

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

Examples

char[] command = "myprogram \"first argument\" second third";
char[][char[]] env;

// Environment variables
env["MYVAR1"] = "first";
env["MYVAR2"] = "second";

auto p = new Process(command, env)

Meta