bevyengine / bevyengine/bevy

Bevy should not catch Ctrl+C by default

Open
#20,367 6 comments 0 reactions 0 assignees View on GitHub
A-App C-Bug
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version

0.16 or git

## \[Optional\] Relevant system information

Any Linux (did not test the behavior on Windows).

## What you did

Accidentally write an infinite loop in a system or task.

## What went wrong

Ctrl+C is now completely non-functional and fails to kill the application.

## Additional information

Bevy should not interfere with basic OS functionality like this. No library should ever silently install a Ctrl+C handler by default (but they do it anyways. they always do).

If you absolutely **MUST** do this, the handler should uninstall itself the moment it catches Ctrl+C (from inside the signal handler), so that at least the next attempt will kill the application properly.

This is part of the problem encountered by users in https://github.com/bevyengine/bevy/issues/20355

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. Start by reproducing the infinite-loop case on Linux and tracing where Bevy installs its default Ctrl+C handler; confirm the behavior around repeated interrupts. Done means Ctrl+C retains normal OS termination behavior by default, or the documented opt-in handler no longer prevents a subsequent interrupt from terminating the application.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.