Permalink
Browse files

[api] Expose `exit:code` event for inspecting exit code on restart

  • Loading branch information...
1 parent 4573ca5 commit 1cf34f7668355bd94a4d087cd86b61738a4cee36 @indexzero indexzero committed Jul 6, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/forever-monitor/monitor.js
@@ -157,6 +157,7 @@ Monitor.prototype.start = function (restart) {
child.on('exit', function (code) {
var spinning = Date.now() - self.ctime < self.minUptime;
child.removeListener('message', onMessage);
+ self.emit('exit:code', code);
function letChildDie() {
self.running = false;

0 comments on commit 1cf34f7

Please sign in to comment.