Ende.ChildProcess

class

class Ende.ChildProcess implements AsyncDisposable

The interface for handling a child process returned from Ende.Command.spawn.

Properties

pid

readonly pid: number

status

readonly status: Promise<CommandStatus>

A promise that resolves once the child process has exited, with its exit code and terminating signal (if any). The promise never rejects; if the process is still running the promise is pending. Accessing this property does not, on its own, prevent the Ende process from exiting - see ChildProcess.ref.

Methods

stdin

get stdin(): WritableStream<Uint8Array<ArrayBufferLike>>

stdout

get stdout(): SubprocessReadableStream

stderr

get stderr(): SubprocessReadableStream

output

output(): Promise<CommandOutput>

Waits for the child to exit completely, returning all its output and status.

kill

kill(signo?: Signal | number): void

Kills the process with given Ende.Signal or numeric signal.

Defaults to SIGTERM if no signal is provided.

signo?: Signal | number

ref

ref(): void

Ensure that the status of the child process prevents the Ende process from exiting.

unref

unref(): void

Ensure that the status of the child process does not block the Ende process from exiting.

[Symbol.asyncDispose]

[Symbol.asyncDispose](): Promise<void>