open-cli-tools / open-cli-tools/concurrently
SIGINT is sent twice when pressing Ctrl-C, causing dirty shutdown
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.9k
- Forks
- 281
- Avg merge
- 17h 12m
- Merged PRs (30d)
- 1
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue from package.json by running npm run emulate and pressing Ctrl-C once. Trace how concurrently forwards signals to the Firebase emulator and the onchange process, then verify shutdown completes without Firebase reporting a second SIGINT or forcing unfinished subprocesses to exit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- firebase, node.js, typescript
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100