Socket
Book a DemoInstallSign in
Socket

end-child-processes

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

end-child-processes

Reliably ends all direct and indirect child processes of the current process

2.0.3
latest
Source
npmnpm
Version published
Weekly downloads
242
18.63%
Maintainers
1
Weekly downloads
 
Created
Source

End-Child-Processes

tests windows Coverage Status install size

This library ends all child processes spawned by the current process, including nested child processes. The current process itself remains unaffected.

Installation

npm install --save end-child-processes

Usage

import { endChildProcesses } from "end-child-processes"

// spawn a long-running subprocess
import * as childProcess from "child_process"
childProcess.exec("node -e 'while (true) {}'")

// end all running subprocesses spawned by this program
await endChildProcesses()

How it works

On Windows, this library does not attempt to end the WMIC.exe process since it terminates on its own.

Dependent on your use case, these other libraries that might also be a good fit for you:

  • ps-tree: displays information about all running subprocesses
  • tree-kill: ends all processes in the process tree, including the current process
  • @jub3i/tree-kill: ends all processes in the process tree, including the current process

FAQs

Package last updated on 20 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.