refactored some code

This commit is contained in:
Ziad Arafat committed 2021-10-06 11:06:53 -06:00
1 parent a3b6083a79
commit 3e3ef43b56
1 file changed
+6 -1
+6 -1
View File
@@ -26,6 +26,7 @@ using the shared memory get method to allocate
- Fixed thread so it has its own array
- BUGFIX: Shared memory was not going away because I wasnt calling shmctl I
mistakenly tought shmdt was all I needed.
- http://www.csl.mtu.edu/cs4411.ck/www/NOTES/process/shm/shmdt.html
-
*/
@@ -369,11 +370,15 @@ int count3s_parallel_proc()
}
childcnt++;
}
int pid;
while (childcnt > 0) {
pid = wait(NULL);
if (DEBUG)
if (DEBUG) {
printf("Process 1 PID %d finished\n", pid);
}
childcnt--;
}