Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bahamas10/node-raise
Send a signal to the current process (see raise(3))
https://github.com/bahamas10/node-raise
Last synced: about 2 months ago
JSON representation
Send a signal to the current process (see raise(3))
- Host: GitHub
- URL: https://github.com/bahamas10/node-raise
- Owner: bahamas10
- Created: 2013-06-09T22:11:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-09T22:12:24.000Z (over 11 years ago)
- Last Synced: 2024-10-29T01:24:25.842Z (about 2 months ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
raise
=====Send a signal to the current process (see `raise(3)`)
Installation
------------npm install raise
Usage
-----``` js
var raise = require('raise');// unceremoniously end this process
raise('SIGKILL');
```Uses
----This can be useful for debugging purposes. A lot of times I've used DTrace
to pause a process when it hits a certain code path so I can inspect its
memory. With this module, you can simply add a `raise` statement where
you would like to send a signal to the process.``` js
var raise = require('raise');var a = [];
for (var i = 0; i < 100; i++) {
a.push(a); // obvious bug// say you thought this function was a problem, but you couldn't identify why,
// pause the process on the 10th iteration to coredump and inspect the memory
if (i === 10) raise('SIGSTOP');
}
```License
-------MIT