Change to kill zombie procs after loop

This commit is contained in:
Isaac Shoebottom 2023-09-29 17:20:10 -03:00
parent 243cf6a67c
commit b80969f6af

View File

@ -146,10 +146,9 @@ void processtree() {
sprintf(num, "The value is %d\n", i); sprintf(num, "The value is %d\n", i);
print_prompt(num); print_prompt(num);
exit(0); exit(0);
} else {
wait(NULL);
} }
} }
while (wait(NULL) > 0);
} }
int main() { int main() {