The OpenD Programming Language

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)
  2. Pid spawnProcess(const(char)[] program, File stdin, File stdout, File stderr, string[string] env, Config config, const(char)[] workDir)
    @trusted
    spawnProcess
    (
    scope const(char)[] program
    ,,,,
    const string[string] env = null
    ,,
    scope const(char)[] workDir = null
    )
  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