Socket
Socket
Sign inDemoInstall

ps-watchdog

Package Overview
Dependencies
9
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ps-watchdog

A module that kills the current process and all the children if the event loop is unresponsive


Version published
Maintainers
1
Install size
130 kB
Created

Readme

Source

Ps-watchdog module

Kills the current process and all the children when the JavaScript event loop is busy for more than a configurable amount of time.

It forks a new process that waits for a periodical keepalive from the event loop.

Installing

npm install ps-watchdog

Using

import {Watchdog} from 'ps-watchdog';

const interval = 1000;
const times = 2;
const watchdog = new Watchdog(interval, times);
watchdog.start();

interval: keepalive interval in milliseconds
times: number of times the process can miss the keepalive before getting killed

License

MIT

Author

Alessio Paccoia <alessio.paccoia@cubbit.io>

FAQs

Last updated on 09 Jan 2019

Did you know?

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc