Skip to main content
Subprocess - Deno documentation

Classes

c
Deno.ChildProcess
The interface for handling a child process returned from `Deno.Command.spawn`.
c
Deno.Command
Create a child process. If any stdio options are not set to `"piped"`, accessing the corresponding field on the `Command` or its `CommandOutput` will throw a `TypeError`. If `stdin` is set to `"piped"`, the `stdin` `WritableStream` needs to be closed manually. `Command` acts as a builder. Each call to `Command.spawn` or `Command.output` will spawn a new subprocess.

Functions

f
Deno.kill
Send a signal to process under given `pid`. The value and meaning of the `signal` to the process is operating system and process dependant. `Signal` provides the most common signals. Default signal is `"SIGTERM"`. The term `kill` is adopted from the UNIX-like command line command `kill` which also signals processes. If `pid` is negative, the signal will be sent to the process group identified by `pid`. An error will be thrown if a negative `pid` is used on Windows. ```ts const command = new Deno.Command("sleep", { args: ["10000"] }); const child = command.spawn(); Deno.kill(child.pid, "SIGINT"); ``` Requires `allow-run` permission.

Interfaces

I
Deno.CommandOptions
Options which can be set when calling [`Deno.Command`](./././~/Deno.Command).
I
Deno.CommandOutput
The interface returned from calling `Deno.Command.output` or `Deno.Command.outputSync` which represents the result of spawning the child process.
I
Deno.CommandStatus
No documentation available