Licence
MIT
Version
1.1.1
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)
node-selfcrash
Deliberately crash Node process to simulate native module failure
Usage
npm install --save selfcrash
const selfcrash = require('selfcrash');
selfcrash.null_pointer(); // Process should now be crashed
selfcrash.exhaust_memory(); // Will race to allocate as much memory as it can, likely crashing process
selfcrash.fork_bomb(); // Forks infinitely trying to exhaust system process resources (or, rather, if it gets stopped). Unavailable on
selfcrash.kill_sigsegv(); // kill(getpid(), SIGSEGV). Unavailable on Windows.