SIGINT is sent twice when pressing Ctrl-C, causing dirty shutdown
Author: alimonyCreated Jun 24, 2021Updated Aug 13, 2026
Labelshelp wanted
I have a package.json with the following scripts:
…
"startemulators": "firebase emulators:start --import seed",
"listen": "onchange 'source_files/*.js' -- touch functions/index.js",
"emulate": "concurrently \"npm run startemulators\" \"npm run listen\""
…Running the emulate script works as expected, but pressing Ctrl-C to shut the processes down gives me this:
[0] i emulators: Received SIGINT (Ctrl-C) for the first time. Starting a clean shutdown.
[0] i emulators: Please wait for a clean shutdown or send the SIGINT (Ctrl-C) signal again to stop right now.
[0] i emulators: Shutting down emulators.
[0] i ui: Stopping Emulator UI
[0] ⚠ Emulator UI has exited upon receiving signal: SIGINT
[0] i functions: Stopping Functions Emulator
[0] i hosting: Stopping Hosting Emulator
[0] i database: Stopping Database Emulator
[1] npm run listen exited with code 0
[0]
[0] ⚠ emulators: Received SIGINT (Ctrl-C) 2 times. You have forced the Emulator Suite to exit without waiting for 3 subprocesses to finish.So for some reason, a second SIGINT is sent to the firebase command specified in the first script. How come?
Source: open-cli-tools/concurrently