perderabo,
yeah it makes sense that both child and process will execute the 3 staments, giving 6 results.
is the output in order of child,child,child,parent,parent,parent
now can u correct me if i m wrong here
0 - is the return int value that is always passed to the child to the child
this one is executed by printf("%d\n",pid);
28873 - is the pid of the child which is contained in the parent
this also executed by printf("%d\n",getpid());
28872 - is the pid of the parent
it is executed by printf("%d\n",getppid());
now running for parent
28873 - is the pid of the child
it is executed by printf("%d\n",pid);
28872 - is the pid of the parent that makes the child here
it is executed by printf("%d\n",getpid());
28086 - is the pid of the shell running this program
it is executed by printf("%d\n",getppid());
arrrrrrrrgh
i am confuuuuuuuused!
Hope i got that right
Sorry i am slow and ask too many questions