Skip to content

Instantly share code, notes, and snippets.

@naosim
Last active August 29, 2015 14:08
Show Gist options
  • Save naosim/aed929955bc7550c0b19 to your computer and use it in GitHub Desktop.
Save naosim/aed929955bc7550c0b19 to your computer and use it in GitHub Desktop.
create kill process sh file
/**
create kill process sh file.
Usage:
require('./killpmaker.js')('stop.sh');
=> create stop.sh
*/
var fs = require('fs');
module.exports = function(file) {
fs.writeFileSync(file, 'kill -9 ' + process.pid);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment