Skip to content

Keep /dev/fb0 out of spawned scripts and show splashes with a moving bar - #7

Merged
DefKorns merged 6 commits into
masterfrom
fix/cloexec
Oct 22, 2026
Merged

DefKorns merged 6 commits into
masterfrom
fix/cloexec

Conversation

@DefKorns

Copy link
Copy Markdown
Owner

For 2.1.0.

  • FD_CLOEXEC: scripts started by the menu inherited its open files, /dev/fb0 included, so uistop (from chmenu, uistart, a folder switch) killed them. MarkFdsCloseOnExec() (src/framework/close_on_exec.*) marks every fd >= 3 close-on-exec right before each system(), popen() and fork+exec in options, save_manager and mod_uninstall. The menu keeps using its fds. The lifecycle's signal handler is left alone.
  • omLoading [key...]: gen_splash --loading now takes the line keys, and draws them with the moving bar until the calling script exits ("Loading" without keys). The Wi-Fi backup splash uses it.
  • omReloadMenu shows the splash while the UI is stopped, instead of a black screen. With omReloadMenuLater it keeps the caller's text, so add-ons show one splash from start to finish.

Tested on the console (SNES Classic, Super Famicom firmware):

  • A child of system() inherited 16 fds with the old binary (/dev/fb0, /dev/mali, /dev/input/event*, /dev/tty0-1), and only its own with the new one.
  • A script started from the menu ran omReloadMenu (uistop + chmenu) to the end and the home menu came back, with the Loading splash.
  • Menus and submenus, toggles and choice rows, command logs, a download, Save Manager, Module Uninstaller, and the Favorites save and reload.
  • tests/run_tests.sh: 27/27 and 11/11. Plain and compat builds.

@DefKorns
DefKorns merged commit 434c634 into master Oct 22, 2026
4 checks passed
@DefKorns
DefKorns deleted the fix/cloexec branch October 22, 2026 13:33
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.

1 participant