Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > SubprocessTerminator > killProcessTreeOnExit

SubprocessTerminator.killProcessTreeOnExit() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Registers a child process so that it will be terminated automatically if the current process is terminated.

Signature:

static killProcessTreeOnExit(subprocess: child_process.ChildProcess, subprocessOptions: ISubprocessOptions): void;

Parameters

Parameter

Type

Description

subprocess

child_process.ChildProcess

subprocessOptions

ISubprocessOptions

Returns:

void