Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class ChildProcess
extends EventEmitter
import { ChildProcess } from "https://deno.land/std@0.151.0/node/internal/child_process.ts";

Constructors

new
ChildProcess(
command: string,
args?: string[],
)

Properties

exitCode: number | null

The exit code of the child process. This property will be null until the child process exits.

killed: boolean

This property is set to true after kill() is called.

pid: number

The PID of this child process.

signalCode: string | null

The signal received by this child process.

spawnargs: string[]

Command line arguments given to this child process.

spawnfile: string

The executable file name of this child process.

stderr: Readable | null

This property represents the child process's stderr.

stdin: Writable | null

This property represents the child process's stdin.

stdio: [Writable | null, Readable | null, Readable | null]

Pipes to this child process.

stdout: Readable | null

This property represents the child process's stdout.

Methods

kill(signal?: number | string): boolean
ref(): void
unref(): void