firebase / firebase/firebase-tools

Revisit shutdown behavior of the emulators

Open
#3,578 14 comments 52 reactions 0 assignees View on GitHub
emulator-suite internal-bug-filed polish type: feature request
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

Currently we do this for the emulators:

* One `Ctrl+C (SIGINT)` --> clean shutdown
* Two or more `Ctrl+C (SIGINT)` separated by a human interval --> immediate shutdown

We should probably _never_ shut down dirty on Ctrl+`SIGINT`, it seems that many tools and terminal emulators pass `SIGINT` many times which causes a dirty shutdowns. Dirty shutdowns can lead to corrupted exports, blocked ports, etc and other things which are much harder to clean up than a runaway process.

We could instead do something like raise a prompt like "You seem to be slamming Ctrl+C friend, would you like to force quit?"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.