Skip to content

Commit

Permalink
"forever start" hangs with node 0.11.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromew committed Feb 14, 2014
1 parent b873164 commit 3cbabf4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,16 @@ forever.startDaemon = function (script, options) {
});

monitor.send(JSON.stringify(options));

// close the ipc communication channel with the monitor
// otherwise the corresponding events listeners will prevent
// the exit of the current process (observed with node 0.11.9)
monitor.disconnect();

// make sure the monitor is unref() and does not prevent the
// exit of the current process
monitor.unref();

return monitor;
};

Expand Down

0 comments on commit 3cbabf4

Please sign in to comment.