summaryrefslogtreecommitdiff
path: root/runtime/js/40_spawn.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/40_spawn.js')
-rw-r--r--runtime/js/40_spawn.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/js/40_spawn.js b/runtime/js/40_spawn.js
index 87db84f4b..4fae9e6b7 100644
--- a/runtime/js/40_spawn.js
+++ b/runtime/js/40_spawn.js
@@ -3,6 +3,7 @@
((window) => {
const core = window.Deno.core;
+ const ops = core.ops;
const { pathFromURL } = window.__bootstrap.util;
const { illegalConstructorKey } = window.__bootstrap.webUtil;
const { add, remove } = window.__bootstrap.abortSignal;
@@ -32,7 +33,7 @@
stderr = "piped",
signal = undefined,
} = {}) {
- const child = core.opSync("op_spawn_child", {
+ const child = ops.op_spawn_child({
cmd: pathFromURL(command),
args: ArrayPrototypeMap(args, String),
cwd: pathFromURL(cwd),
@@ -203,7 +204,7 @@
if (this.#rid === null) {
throw new TypeError("Child process has already terminated.");
}
- core.opSync("op_kill", this.#pid, signo);
+ ops.op_kill(this.#pid, signo);
}
ref() {
@@ -246,7 +247,7 @@
"Piped stdin is not supported for this function, use 'Deno.spawnChild()' instead",
);
}
- const result = core.opSync("op_spawn_sync", {
+ const result = ops.op_spawn_sync({
cmd: pathFromURL(command),
args: ArrayPrototypeMap(args, String),
cwd: pathFromURL(cwd),