Socket
Socket
Sign inDemoInstall

exit-on-epipe

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exit-on-epipe

Cleanly exit process on EPIPE


Version published
Weekly downloads
1.3M
decreased by-2.03%
Maintainers
1
Weekly downloads
 
Created

What is exit-on-epipe?

The exit-on-epipe npm package is designed to automatically handle the 'EPIPE' error by attaching a listener to the 'process.stdout' and 'process.stderr' streams. This error typically occurs when a process writes to a stream (like stdout or stderr) but the stream has been closed, often because the output is being piped to another process which has terminated. Instead of throwing an error and potentially crashing the application, exit-on-epipe ensures the process exits gracefully.

What are exit-on-epipe's main functionalities?

Automatic EPIPE error handling

By simply requiring the exit-on-epipe package at the beginning of your application, it automatically handles EPIPE errors for stdout and stderr, preventing your application from crashing due to broken pipes. This is particularly useful in command-line applications that may be piped into other processes.

require('exit-on-epipe');
process.stdout.write('Hello, world!');

Other packages similar to exit-on-epipe

Keywords

FAQs

Package last updated on 23 Jul 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc