Skip to content

Commit

Permalink
Make Deno.kill unstable (denoland#4950)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato authored and SASUKE40 committed May 7, 2020
1 parent d4e18ab commit 2d7d6b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/js/lib.deno.ns.d.ts
Expand Up @@ -2177,6 +2177,13 @@ declare namespace Deno {
* This calls `close()` on stderr after its done. */
stderrOutput(): Promise<Uint8Array>;
close(): void;

/** **UNSTABLE**: The `signo` argument may change to require the Deno.Signal
* enum.
*
* Send a signal to process. This functionality currently only works on
* Linux and Mac OS.
*/
kill(signo: number): void;
}

Expand Down
1 change: 1 addition & 0 deletions cli/ops/process.rs
Expand Up @@ -229,6 +229,7 @@ fn op_kill(
args: Value,
_zero_copy: Option<ZeroCopyBuf>,
) -> Result<JsonOp, OpError> {
state.check_unstable("Deno.kill");
state.check_run()?;

let args: KillArgs = serde_json::from_value(args)?;
Expand Down

0 comments on commit 2d7d6b5

Please sign in to comment.