This commit is contained in:
Ziad Arafat committed 2021-10-06 11:50:47 -06:00
1 parent 3e3ef43b56
commit 27d6b90344
1 file changed
+5 -2
+5 -2
View File
@@ -220,7 +220,10 @@ int main(int argc, char const *argv[])
exit(-1);
}
shmctl(shmid, IPC_RMID, NULL);
if (shmctl(shmid, IPC_RMID, NULL) < 0) {
perror("Cant delete shared memory");
exit(1);
}
return 0;
}
@@ -370,7 +373,7 @@ int count3s_parallel_proc()
}
childcnt++;
}
int pid;
while (childcnt > 0) {
pid = wait(NULL);