Wait for remaining background jobs after a compilation error has been reported.

[COMPILER]
* BUG: Wait for remaining background jobs after a compilation error has been reported.
This commit is contained in:
gambas 2021-02-02 23:46:00 +01:00
parent 35284fd791
commit 74f6f1e781

View file

@ -433,7 +433,14 @@ static void wait_for_task(void)
if (!WIFEXITED(status))
THROW("A child process has failed");
if (WEXITSTATUS(status))
{
while (_ntask > 0)
{
wait(&status);
_ntask--;
}
exit(1);
}
if (COMP_verbose)
fprintf(stderr, "gbc" GAMBAS_VERSION_STRING ": end task %d\n", pid);