kill running processes when building

This commit is contained in:
jacob 2025-02-24 17:28:27 -06:00
parent a8246541e9
commit 4d7ab508fb

View File

@ -52,6 +52,11 @@ SH_CommandResult RunCommand(Arena *arena, String command)
return res; return res;
} }
void KillRunningProcesses(void)
{
SH_RunCommand(Lit("taskkill /im PowerPlay.exe /f /fi \"STATUS eq RUNNING\""), true);
}
/* ========================== * /* ========================== *
* Step * Step
* ========================== */ * ========================== */
@ -977,6 +982,7 @@ void OnBuild(StringList cli_args)
Bool success = true; Bool success = true;
I64 step_count = sl->count; I64 step_count = sl->count;
if (step_count > 0) { if (step_count > 0) {
KillRunningProcesses();
ExecuteSteps(); ExecuteSteps();
Step *s = sl->first; Step *s = sl->first;