Don't launch exes concurrently because they compete

This commit is contained in:
Krzosa Karol
2024-01-27 21:51:10 +01:00
parent 6e7438e19b
commit 1b6643e4a8
2 changed files with 3 additions and 11 deletions

View File

@@ -97,17 +97,9 @@ int main(int argc, char **argv) {
// Run exes if there were no errors
//
if (result == 0) {
processes.reset();
For(exes) {
Process p = RunEx(it);
processes.add(p);
}
int i = 0;
For(processes) {
int exit_code = Wait(&it);
S8_String name = exes[i++];
IO_Printf("%.*s - %d\n", S8_Expand(name), exit_code);
int exit_code = Run(it);
IO_Printf("%.*s - %d\n", S8_Expand(it), exit_code);
if (exit_code != 0) result = exit_code;
}
}

View File

@@ -56,7 +56,7 @@ int main() {
S8_String work_path = OS_GetWorkingDir(&arena);
S8_String abs_path = OS_GetAbsolutePath(&arena, read_file_path);
IO_Assert(OS_IsDir(dir_path));
IO_Assertf(OS_IsDir(dir_path), "%.*s", S8_Expand(dir_path));
IO_Assert(!OS_IsFile(dir_path));
IO_Assert(OS_IsFile(exe_path));