so i fork n process:
for(i=0; i<numOfProcess; i++)
pid == fork();
if(pid == -1)
//error handling
if(pid == 0){
//child, do something
exit(0);
}
else{ //parent
//i want to wait till all children are done before continue..how?
//i tried wait(NULL), and waitpid(pid, NULL, 0)
//but both wont work..?
//...........
//something done in parent
}