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