Skip to main content

Interface: Process

Extends​

  • AsyncDisposable

Properties​

pid​

pid: number


stderr​

stderr: ProcessReadableStream | null


stdin​

stdin: WritableStream<Uint8Array<ArrayBufferLike>> | null


stdout​

stdout: ProcessReadableStream | null

Methods​

[asyncDispose]()​

[asyncDispose](): PromiseLike<void>

Returns​

PromiseLike<void>

Inherited from​

AsyncDisposable.[asyncDispose]


kill()​

kill(signal?): void

Parameters​

signal?​

Signal

Returns​

void


wait()​

wait(): Promise<ProcessStatus>

Resolves once the subprocess has exited.

The interface is also async-disposable: at the end of an await using p = tjs.spawn(...) scope, SIGTERM is sent (best effort) and wait is awaited.

Returns​

Promise<ProcessStatus>