Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/web_ui/dev/felt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ void main(List<String> args) async {
io.exit(64); // Exit code 64 indicates a usage error.
}

_listenToShutdownSignals();

try {
final bool result = await runner.run(args);
if (result == false) {
Expand All @@ -41,3 +43,14 @@ void main(List<String> args) async {
// Sometimes the Dart VM refuses to quit.
io.exit(io.exitCode);
}

void _listenToShutdownSignals() {
io.ProcessSignal.sigint.watch().listen((_) {
print('Received SIGINT. Shutting down.');
io.exit(1);
});
io.ProcessSignal.sigterm.watch().listen((_) {
print('Received SIGTERM. Shutting down.');
io.exit(1);
});
}