Permalink
Browse files

[fix] Add the child PID to the list from `psTree` not remove it

  • Loading branch information...
1 parent 7ae3d1d commit fa03117cf3276aabe9e5fba0c3751bd67fdb106d @indexzero committed Oct 9, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/forever/monitor.js
View
@@ -381,7 +381,7 @@ Monitor.prototype.kill = function (forceStop) {
return p.PID;
});
- pids.shift(self.child.pid);
+ pids.unshift(self.child.pid);
spawn('kill', ['-9'].concat(pids)).on('exit', function () {
self.emit('stop', self.childData);
});
@@ -391,7 +391,6 @@ Monitor.prototype.kill = function (forceStop) {
this.child.kill();
this.emit('stop', this.childData);
}
-
}
return this;

0 comments on commit fa03117

Please sign in to comment.