Skip to content

Commit

Permalink
Force quit CUI when VM is powered-off.
Browse files Browse the repository at this point in the history
  • Loading branch information
captainys committed Feb 4, 2025
1 parent 3a24d0d commit 09c315f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main_cui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ int Run(FMTownsTemplate <CPUCLASS> &towns,const TownsARGV &argv,Outside_World &o
}

VMThread.join();

exit(towns.var.returnCode);
// CUI will wait for a command forever. Is there any way I can programmatically send CR to the terminal?
// I have already tried freopen(stdin).

UIThread.join();

return towns.var.returnCode;
Expand Down

0 comments on commit 09c315f

Please sign in to comment.