Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

native: install-reboot (SDL path) → ac_reboot() instead of _exit(0)

The SDL init path's post-install reboot hit `_exit(0)` after trying
sysrq-b + reboot -f. Exit code 0 tells init.sh "POWER OFF, don't
reboot", so if the reboot attempts failed, init.sh would drop into
its poweroff branch and wait forever instead of trying its own
fallback ladder (reboot -f → sysrq-b → halt -f → sysrq-c panic).

Route both install paths through ac_reboot() for consistency —
reboot(2) syscall tries UEFI ResetSystem first (reboot=efi,cold),
then systemctl/busybox reboot fallbacks, then _exit(2) which keys
init.sh's reboot branch. Matches what os.mjs's "y: reboot" flow
already does.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+12 -7
+12 -7
fedac/native/src/ac-native.c
··· 2996 2996 int should_reboot = draw_install_reboot_prompt(&graph, screen, display, input, tts, audio, install_ok, pixel_scale); 2997 2997 if (should_reboot) { 2998 2998 if (tts) tts_wait(tts); // let TTS finish before reboot 2999 - sync(); 3000 - usleep(500000); // 0.5s grace 3001 - // sysrq reboot (most reliable under initramfs) 3002 - FILE *sr = fopen("/proc/sysrq-trigger", "w"); 3003 - if (sr) { fputs("b", sr); fclose(sr); } 3004 - system("reboot -f"); 3005 - _exit(0); 2999 + // Use the shared ac_reboot() path — it tries reboot(2) 3000 + // syscall first (reboot=efi,cold cmdline steers this 3001 + // to UEFI ResetSystem which is the only consistently 3002 + // working path on coreboot Chromebooks), falls back 3003 + // to systemctl / busybox reboot -f, then finally 3004 + // _exit(2) so init.sh sees "reboot requested" and 3005 + // re-enters its own multi-tiered reboot loop 3006 + // (reboot -f → sysrq-b → halt -f → sysrq-c panic). 3007 + // The old path here did `_exit(0)` which triggered 3008 + // init.sh's POWEROFF branch, so a failing reboot(2) 3009 + // would hang waiting to power off instead of retrying. 3010 + ac_reboot(); 3006 3011 } 3007 3012 } 3008 3013 }