From e7e6dfc3e6e431aa7ffe581139ef25e19b8db0c5 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Sat, 7 Jun 2014 15:05:33 +0000 Subject: [PATCH] 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. --- core/server/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/index.js b/core/server/index.js index d4c34b78df..cdf73c0057 100644 --- a/core/server/index.js +++ b/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",