title: How to kill childprocess in nodejs?
body: <p>Created a childprocess using shelljs</p>
  
  <pre><code>!/usr/bin/env node
  
  require('/usr/local/lib/node_modules/shelljs/global');
     fs = require("fs");  
     var child=exec("sudo mongod &amp;",{async:true,silent:true});
  
     function on_exit(){
          console.log('Process Exit');
          child.kill("SIGINT");
          process.exit(0)
      }
  
      process.on('SIGINT',on_exit);
      process.on('exit',on_exit);
  </code></pre>
  
  <p>Child process is still running .. after kill the parent process</p>