Skip to content
Permalink
Browse files

Clear any existing SIGINT listeners during startup

No issue
-remove any existing listeners on the SIGINT event during
 the ghost bootstrap process.  handles an issue during testing
 where node was warning about too many listeners.
  • Loading branch information...
jaswilli committed Jun 7, 2014
1 parent d9f7aa2 commit e7e6dfc3e6e431aa7ffe581139ef25e19b8db0c5
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/server/index.js
@@ -133,7 +133,7 @@ function ghostStartMessages() {
);

// ensure that Ghost exits correctly on Ctrl+C
process.on('SIGINT', function () {
process.removeAllListeners('SIGINT').on('SIGINT', function () {
console.log(
"\nGhost has shut down".red,
"\nYour blog is now offline"
@@ -150,7 +150,7 @@ function ghostStartMessages() {
"\nCtrl+C to shut down".grey
);
// ensure that Ghost exits correctly on Ctrl+C
process.on('SIGINT', function () {
process.removeAllListeners('SIGINT').on('SIGINT', function () {
console.log(
"\nGhost has shutdown".red,
"\nGhost was running for",

0 comments on commit e7e6dfc

Please sign in to comment.
You can’t perform that action at this time.