Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # signal-exit
  2. [![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit)
  3. [![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master)
  4. [![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit)
  5. [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)
  6. When you want to fire an event no matter how a process exits:
  7. * reaching the end of execution.
  8. * explicitly having `process.exit(code)` called.
  9. * having `process.kill(pid, sig)` called.
  10. * receiving a fatal signal from outside the process
  11. Use `signal-exit`.
  12. ```js
  13. var onExit = require('signal-exit')
  14. onExit(function (code, signal) {
  15. console.log('process exited!')
  16. })
  17. ```
  18. ## API
  19. `var remove = onExit(function (code, signal) {}, options)`
  20. The return value of the function is a function that will remove the
  21. handler.
  22. Note that the function *only* fires for signals if the signal would
  23. cause the proces to exit. That is, there are no other listeners, and
  24. it is a fatal signal.
  25. ## Options
  26. * `alwaysLast`: Run this handler after any other signal or exit
  27. handlers. This causes `process.emit` to be monkeypatched.