spawnProcess

Returns the process ID of the current thread, which is guaranteed to be unique within the current process.

  1. Pid spawnProcess(const(char[])[] args, string[string] env, Config config, const(char)[] workDir)
    @trusted
    spawnProcess
    (
    scope const(char[])[] args
    ,
    const string[string] env
    ,,
    scope const(char)[] workDir = null
    )
  2. Pid spawnProcess(const(char)[] program, File stdin, File stdout, File stderr, string[string] env, Config config, const(char)[] workDir)
  3. Pid spawnProcess(const(char)[] program, string[string] env, Config config, const(char)[] workDir)

Return Value

Type: Pid

A core.thread.ThreadID value for the calling thread.

Examples

writefln("Current thread ID: %s", thisThreadID);

Meta