Skip to content

Function: terminateProcessGroupWithGrace() ​

ts
function terminateProcessGroupWithGrace(child, graceMs?): Promise<void>;

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

Terminates a detached child process group and descendant PID tree gracefully (pidtree + fkill).

Delegates to terminatePidTreeWithGrace when child.pid is defined and ensures child has exited.

Parameters ​

ParameterTypeDefault valueDescription
childChildProcessundefinedDetached child process to terminate.
graceMs?numberDEFAULT_SUBPROCESS_GRACE_MSMilliseconds to wait after SIGTERM before SIGKILL.

Returns ​

Promise<void>

Resolves once the process group and descendant tree have been terminated.

Released under the MIT License.