Unitech/PM2 — pull request #750 by angelix (2014-10-01 21:52:26+00:00)
Title: Avoid restart of delayed killed process (pm2 stop)

If a process for some reason delays itself to be killed, pm2 restarts the process.

This is partial fix commit, fixing only the process stop procedure.
If you want to restart the process, the process is going to spawn two times in a row. One from the restart procedure and one from the monitor procedure.

Example testcase:

try to restart the process and then pm2 list

```javascript
process.on('SIGTERM', function() {
console.log('Got SIGTERM signal.');
exit();
});
process.on('SIGINT', function() {
console.log('SIGINT signal');
exit();
});
process.on('exit', function() {
console.log('exit signal');
});
function exit(){
console.log("Delay exit in 2 secs");
setTimeout(function(){
process.exit();
}, 2000);
}
(function wait () {
setTimeout(wait, 1000);
})();
console.log("Now you can exit.");
```