Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

terminate

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terminate - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "terminate",
"version": "1.0.1",
"version": "1.0.2",
"description": "Terminate a Node.js Process based on the Process ID",

@@ -5,0 +5,0 @@ "main": "terminate.js",

# terminate
Terminate a Node.js Process based on the Process ID
A reliable (tested) way to **Terminate** a **Node.js Process** (and ***all Child Processes***) based on the **Process ID**
![terminate-the-node-process-final](https://cloud.githubusercontent.com/assets/194400/6859420/a3b63f3c-d410-11e4-91bb-ad6b607cc465.png)

@@ -15,4 +16,25 @@

## Usage
### Install from NPM
```sh
npm install terminate --save
```
### In your script
```js
var terminate = require('terminate');
terminate(process.pid, function(err, done){
if(err) { // you will get an error if you did not supply a valid process.pid
console.log("Oopsy: " + err); // handle errors in your preferred way.
}
else {
console.log(done); // do what you do best!
}
})
```
<br />

@@ -22,2 +44,10 @@

## Why?
In our [***Faster***](https://github.com/ideaq/faster) project
we run the server using a child process.
When we want to re-start the server,
we needed to ensure the **process** (and any **Child Processes**)
were **Terminate**ed before re-start.
## Research

@@ -24,0 +54,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc