8.0.0 • Published 4 months ago

human-signals v8.0.0

Weekly downloads
11,704,341
License
Apache-2.0
Repository
github
Last release
4 months ago

Node TypeScript Codecov Mastodon Medium

Human-friendly process signals.

This is a map of known process signals with some information about each signal.

Unlike os.constants.signals this includes:

Hire me

Please reach out if you're looking for a Node.js API or CLI engineer (11 years of experience). Most recently I have been Netlify Build's and Netlify Plugins' technical lead for 2.5 years. I am available for full-time remote positions.

Example

import { signalsByName, signalsByNumber } from 'human-signals'

console.log(signalsByName.SIGINT)
// {
//   name: 'SIGINT',
//   number: 2,
//   description: 'User interruption with CTRL-C',
//   supported: true,
//   action: 'terminate',
//   forced: false,
//   standard: 'ansi'
// }

console.log(signalsByNumber[8])
// {
//   name: 'SIGFPE',
//   number: 8,
//   description: 'Floating point arithmetic error',
//   supported: true,
//   action: 'core',
//   forced: false,
//   standard: 'ansi'
// }

Install

npm install human-signals

This package works in Node.js >=18.18.0.

This is an ES module. It must be loaded using an import or import() statement, not require(). If TypeScript is used, it must be configured to output ES modules, not CommonJS.

Usage

signalsByName

Type: object

Object whose keys are signal names and values are signal objects.

signalsByNumber

Type: object

Object whose keys are signal numbers and values are signal objects.

signal

Type: object

Signal object with the following properties.

name

Type: string

Standard name of the signal, for example 'SIGINT'.

number

Type: number

Code number of the signal, for example 2. While most number are cross-platform, some are different between different OS.

description

Type: string

Human-friendly description for the signal, for example 'User interruption with CTRL-C'.

supported

Type: boolean

Whether the current OS can handle this signal in Node.js using process.on(name, handler).

The list of supported signals is OS-specific.

action

Type: string\ Enum: 'terminate', 'core', 'ignore', 'pause', 'unpause'

What is the default action for this signal when it is not handled.

forced

Type: boolean

Whether the signal's default action cannot be prevented. This is true for SIGTERM, SIGKILL and SIGSTOP.

standard

Type: string\ Enum: 'ansi', 'posix', 'bsd', 'systemv', 'other'

Which standard defined that signal.

Support

For any question, don't hesitate to submit an issue on GitHub.

Everyone is welcome regardless of personal background. We enforce a Code of conduct in order to promote a positive and inclusive environment.

Contributing

This project was made with ❤️. The simplest way to give back is by starring and sharing it online.

If the documentation is unclear or has a typo, please click on the page's Edit button (pencil icon) and suggest a correction.

If you would like to help us fix a bug or add a new feature, please check our guidelines. Pull requests are welcome!

Thanks go to our wonderful contributors:

execafree-minarchetype-librarycomponennentteasy-select-rnvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-imagespecify-importsbabel-specify-importsreact-native-template-rfbaseairscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfdeneme323112@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-covid-sdkgql_din_modbitget@jttechnic/interpreter@iobroker-community-adapters/iobroker.device-watcher@olivervorasai/slidermysql-formatreact-native-printer-brotherscbmis-ai-toolbox@newhorizon-tech/dd-npm-package-templatereact-native-shekhar-bridge-testcogoportutilslevibestliblevibestlib2levilibtest19levilibtest24levilibtest25levilibtest26levilibtest27levilibtest28levilibtest29wilscanner@oiti/documentoscopy-react-nativejs4cytoscape@mink-opn/build-tokensquoc-testunblock-block-save-variablescclibyarntest@saaspe/componentshyperpass-sdkplginexpand-react-bridgeopea-bootstraapluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-1878jawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-table@rabailriaz/hisaab-web-portalsklif-uircf-tea-testnetreact-native-jawwy_samplelapture-ui-complaptureuigriffin-ui-librarynebula-http-resiliencycomposize@wacoco/ytaman-baca-masyarakattailwind-vector-effectsyncbackbasestemplewallet-eslint-plugintest-library-123test-haptik-libwinx-form-winxwontbreakvue-button-test1webdatabasetest1webdatabasetest10webdesa-laravel-final-releasewebpack_component_fundwoven-challenge-deploywifi_configuration_packages3-modulern-tm-notifyrn-use-modal-hookrn-currency-formatterrn-counter-demorn-session-multiplier-demorn_unique_device_idrnttlockshainashirin-common-packageshowgallery
8.0.0

4 months ago

7.0.0

7 months ago

6.0.0

1 year ago

5.0.0

2 years ago

4.3.1

2 years ago

4.3.0

2 years ago

4.1.0

2 years ago

4.2.0

2 years ago

4.0.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago