diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-09-12 12:24:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-12 19:24:58 +0000 |
commit | 18b89d948dcb849c4dc577478794c3d5fb23b597 (patch) | |
tree | 9945567e4b53dc50d2a61a3149b51edf97c05839 /runtime/js | |
parent | 3f15e300625723df10c564c4e29ec276288a931b (diff) |
fix(ext/node): Implement detached option in `child_process` (#25218)
Fixes https://github.com/denoland/deno/issues/25193.
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/40_process.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index 358805180..ac9411916 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -157,6 +157,10 @@ function run({ return new Process(res); } +export const kExtraStdio = Symbol("extraStdio"); +export const kIpc = Symbol("ipc"); +export const kDetached = Symbol("detached"); + const illegalConstructorKey = Symbol("illegalConstructorKey"); function spawnChildInner(command, apiName, { @@ -166,13 +170,14 @@ function spawnChildInner(command, apiName, { env = { __proto__: null }, uid = undefined, gid = undefined, + signal = undefined, stdin = "null", stdout = "piped", stderr = "piped", - signal = undefined, windowsRawArguments = false, - ipc = -1, - extraStdio = [], + [kDetached]: detached = false, + [kExtraStdio]: extraStdio = [], + [kIpc]: ipc = -1, } = { __proto__: null }) { const child = op_spawn_child({ cmd: pathFromURL(command), @@ -188,6 +193,7 @@ function spawnChildInner(command, apiName, { windowsRawArguments, ipc, extraStdio, + detached, }, apiName); return new ChildProcess(illegalConstructorKey, { ...child, @@ -414,6 +420,7 @@ function spawnSync(command, { stderr, windowsRawArguments, extraStdio: [], + detached: false, }); return { success: result.status.success, |