mirror of
https://github.com/MCKero6423/uv-k5-v3-emulator.git
synced 2026-10-02 03:15:36 +00:00
The server now owns the QEMU process by default but does not launch it. You open the page to a dark screen and press On, which is the behaviour asked for: like walking up to a machine rather than finding it already booted. This inverts the flag from the plan. Owning the process has to be the default, since it is the only way On/Off can work at all; --attach is the opt-in for joining a run.sh instance, where Off is refused. Two tests guard the intent rather than the wiring: one asserts main() has --attach and not --own-emulator, another asserts main() never calls power_on(), so a future edit cannot quietly restore auto-boot. Verified on the live server with no QEMU running beforehand: startup 0 QEMU processes, powered=false, frame.png 503, page 200 On 1 QEMU process, powered=true, frame.png 200 (2920 bytes) Off 0 QEMU processes, frame.png 503, page still 200, keys 409 On again 1 QEMU process, powered=true, frame.png 200 The web server stays up across Off, which is what you asked for: the screen goes dark and waits for the next person to press On.