0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

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.
This commit is contained in:
Jason Williams 2014-06-07 15:05:33 +00:00
parent d9f7aa2ce1
commit e7e6dfc3e6

View file

@ -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",