3.0.1 • Published 7 months ago

human-signals v3.0.1

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

Codecov Build Node Twitter 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:

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 is an ES module and must be loaded using an import or import() statement, not require().

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:

execavuedragdropuploadimagesreact-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_mod@zebracompany/f_editor@xswap/token-listsbitgetbtn-demossjesusdemojs4cytoscapeluojia-cli-devnpm-package-mentorcheckni-game-enginereact-learning-demo-libraryreact-native-plugpag-wrapperreact-native-pulsator-nativereact-native-kakao-mapsreact-native-test-module-hhhreact-native-template-nascam-templatereact-native-responsive-sizereact-native-modal-progress-barreact-native-biometric-authenticatereact-native-contact-listreact-native-flyyreact-native-dsphoto-modulereact-native-is7regression-external-dtoreikamoon-string-library-aanative-kakao-loginnative-apple-loginnative-google-loginmncssmap-values-resolverreact-native-ytximkitreact-picky-with-clearrfp-libhexyun.helpershot-zone-vuemiracle-webpack-tree-shakingant-design-draggable-modal-4ant-design-draggable-modal-fixant-design-draggable-modal-fix-2babel-plugin-specify-importsbinary-booking-calendarcomponennenttcotrader-dex-sdkcpcs6_loggerckeditor5-build-custom-strapickeditor5-custom-build-for-irrosoftckeditor5-click-virtualckeditor5-custom-symmetreckeditor5-strapi-msgflowable-bpmn-modelergenerator-bootstrap-boilerplate-templategenerator-liuhuijun-vuediscord.js-bycondiscordjs-con-selfdate-library-aadataormdrowl-base-theme-iconsetexeca-tree-killcatch-exitcom.meenrios.samplebusiness-sbcckeditor-5-imi-1google-remakegenerator-webdesign-boilerplatets-reactxstringlbsvavatar@apardellass/react-native-audio-stream@arielapaula/components@arielapaula/test@asiz33/smartblok-vendure-plugintestapatailwind-vector-effectwoven-challenge-deployvue-v3-yandex-metrika@bezael-challenge/innoit-date-format@buganto/client@daotl/ts-lib-starter@corelmax/react-native-my2c2p-sdk@cryptocode99/token-lists@dalygbarron/fish-tank@demoflow/nested-list@datalogic/react-native-datalogic-module
3.0.1

7 months ago

3.0.0

7 months ago

2.1.0

2 years ago

2.0.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago