Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exit(0) crashing #760

Merged
merged 1 commit into from
Mar 10, 2022
Merged

Conversation

Daft-Freak
Copy link
Collaborator

exit is marked as not returning, bad things happen if it does. This worked fine until #661 made it so that blit_exit didn't reset when there wasn't an error.

This is the easiest fix of always resetting in blit_exit... which isn't as clean an exit as you get from using the menu. While typing this patch I thought of an alternative, which is slightly more magic: Daft-Freak@645a3a5

Can't have exit returning when it's marked noreturn
@Gadgetoid Gadgetoid merged commit f4338b5 into 32blit:master Mar 10, 2022
@Gadgetoid
Copy link
Contributor

Ooh, nice, thank you!

The magic fix looks intriguing though if my experience at being terrible at writing drivers for MicroPython is anything to go by, it can't hurt to have a real system reset every now and then.

@Daft-Freak Daft-Freak deleted the exit-noreturn-reset branch March 10, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants