I have written following simple program for fork.
I am allocating memory in the parent process. The question I have is I
am freeing this memory in the child process. since childid is a
pointer, will the entire allocated memory in parent process gets free.
or does fork copy the childid and allocates memory for every child
process and thus childid array of parent remain intact.
pid_t *childid=(pid_t *)malloc(sizeof(pid_t)*10);
fprintf(stdout,"Hi I am child process %d\n",i);
fprintf(stdout,"My process id is %d and my parent id is