summaryrefslogtreecommitdiff
path: root/cli/js/process.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-02-25 09:14:27 -0500
committerGitHub <noreply@github.com>2020-02-25 09:14:27 -0500
commit91b606aaae23bcb790b55adc5fe70a182a37d564 (patch)
tree16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/js/process.ts
parent805992b14a65a6dbfb857dea6d9b657477de043d (diff)
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/process.ts')
-rw-r--r--cli/js/process.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/cli/js/process.ts b/cli/js/process.ts
index 5267763c1..4c8685cae 100644
--- a/cli/js/process.ts
+++ b/cli/js/process.ts
@@ -1,6 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "./dispatch_json.ts";
-import * as dispatch from "./dispatch.ts";
import { File, close } from "./files.ts";
import { ReadCloser, WriteCloser } from "./io.ts";
import { readAll } from "./buffer.ts";
@@ -38,7 +37,7 @@ interface RunStatusResponse {
}
async function runStatus(rid: number): Promise<ProcessStatus> {
- const res = (await sendAsync(dispatch.OP_RUN_STATUS, {
+ const res = (await sendAsync("op_run_status", {
rid
})) as RunStatusResponse;
@@ -57,7 +56,7 @@ async function runStatus(rid: number): Promise<ProcessStatus> {
* Requires the `--allow-run` flag.
*/
export function kill(pid: number, signo: number): void {
- sendSync(dispatch.OP_KILL, { pid, signo });
+ sendSync("op_kill", { pid, signo });
}
export class Process {
@@ -220,7 +219,7 @@ export function run(opt: RunOptions): Process {
stderrRid
};
- const res = sendSync(dispatch.OP_RUN, req) as RunResponse;
+ const res = sendSync("op_run", req) as RunResponse;
return new Process(res);
}