Module process

Types

Process* = ref object
  files*: seq[BytePipe]
  pid*: int
  completer: Completer[int]
  options: uv_process_options_t
  process: ptr uv_process_t
  args: seq[string]
  argsRaw: seq[pointer]
  environ: seq[string]
  environRaw: seq[pointer]
  stdioContainers: seq[uv_stdio_container_t]
  Source Edit

Vars

SOCK_CLOEXEC* {.
importc, header: "<sys/socket.h>"
.}: cint
  Source Edit

Procs

proc startProcess*(command: seq[string]; environ: TableRef[string, string] = nil;
                  additionalEnv: openarray[tuple[k: string, v: string]] = [];
    additionalFiles: openarray[tuple[target: cint, src: cint]] = [];
                  pipeFiles: openarray[cint] = []; detached = false; uid: uint32 = 0;
                  gid: uint32 = 0): Process
Start a new process.   Source Edit
proc wait*(process: Process): Future[int]
Wait until process returns.   Source Edit
proc kill*(process: Process; signal: int = 15)
  Source Edit
proc waitForSuccess*(process: Process): Future[void]
Wait until process returns. Return error if exit code is other than 0.   Source Edit
proc detach*(process: Process)
  Source Edit
proc runProcess*(command: seq[string]; environ: TableRef[string, string] = nil;
                additionalEnv: openarray[tuple[k: string, v: string]] = [];
    additionalFiles: openarray[tuple[target: cint, src: cint]] = [];
                pipeFiles: openarray[cint] = []; detached = false; uid: uint32 = 0;
                gid: uint32 = 0): Future[void]
  Source Edit
proc checkOutput*(command: seq[string]; environ: TableRef[string, string] = nil;
                 additionalEnv: seq[tuple[k: string, v: string]] = @ []): Future[string] {.
async
.}
  Source Edit