Skip to content

Function: spawnDetachedSubprocess() ​

ts
function spawnDetachedSubprocess(params): ChildProcess;

Defined in: node/src/executors/internal/process-group-lifecycle.ts:115

Spawns a detached OS subprocess group (detached: true) with piped stdout and stderr.

Places the child process in its own process group (-pid) so terminateProcessGroupWithGrace can reap the entire descendant tree on timeout or abort.

Parameters ​

ParameterTypeDescription
paramsSpawnDetachedSubprocessParamsSubprocess argv, resolved environment, and stdin mode.

Returns ​

ChildProcess

Spawned detached child process handle.

Throws ​

If params.argv is empty.

Released under the MIT License.