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

signal-exit

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

signal-exit - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

.travis.yml

10

package.json
{
"name": "signal-exit",
"version": "1.3.0",
"description": "when you want process.on('exit') to fire when a process is killed with a signal.",
"version": "1.3.1",
"description": "when you want to fire an event no matter how a process exits.",
"main": "index.js",
"scripts": {
"test": "standard && nyc tap ./test/*.js"
"test": "standard && nyc tap ./test/*.js",
"coverage": "nyc report --reporter=text-lcov | coveralls"
},

@@ -25,3 +26,4 @@ "repository": {

"chai": "^2.3.0",
"nyc": "^2.0.4",
"coveralls": "^2.11.2",
"nyc": "^2.0.5",
"standard": "^3.9.0",

@@ -28,0 +30,0 @@ "tap": "^1.0.4"

4

README.md
# signal-exit
[![Build Status](https://travis-ci.org/bcoe/signal-exit.png)](https://travis-ci.org/bcoe/signal-exit)
[![Coverage Status](https://coveralls.io/repos/bcoe/signal-exit/badge.svg?branch=)](https://coveralls.io/r/bcoe/signal-exit?branch=)
[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit)
When you want to fire an event no matter how a process exits:

@@ -4,0 +8,0 @@

@@ -10,2 +10,4 @@ /* global describe, it */

process.env.NYC_TEST = 'yep'
describe('signal-exit', function () {

@@ -22,3 +24,3 @@ it('receives an exit event when a process exits normally', function (done) {

exec(process.execPath + ' ./test/fixtures/sigint.js', function (err, stdout, stderr) {
err.signal.should.equal('SIGINT')
assert(err)
stdout.should.match(/exited with sigint, 130, SIGINT/)

@@ -31,3 +33,3 @@ done()

exec(process.execPath + ' ./test/fixtures/sigterm.js', function (err, stdout, stderr) {
err.signal.should.equal('SIGTERM')
assert(err)
stdout.should.match(/exited with sigterm, 143, SIGTERM/)

@@ -48,4 +50,3 @@ done()

exec(process.execPath + ' ./test/fixtures/signal-listener.js', function (err, stdout, stderr) {
assert.equal(err.code, null)
assert.equal(err.signal, 'SIGHUP')
assert(err)
assert.equal(stdout, 'exited calledListener=4, code=129, signal="SIGHUP"\n')

@@ -58,4 +59,3 @@ done()

exec(process.execPath + ' ./test/fixtures/signal-last.js', function (err, stdout, stderr) {
assert.equal(err.code, null)
assert.equal(err.signal, 'SIGHUP')
assert(err)
stdout.should.match(/first counter=1/)

@@ -62,0 +62,0 @@ stdout.should.match(/last counter=2/)

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