hi all,
I want to understand how the fork call return 0 in child and 'pid of child' in the parent.
Presently my (naive)understanding is that the %eax value is stored differently for the child and the parent.
Both the child and the parent returns from fork to the same instruction address, but will have different return values according to %eax.
Is my understanding correct?
Can somebody point out where exaclty in the source this is taken care of?
Thanks,
Mugunthan
I want to understand how the fork call return 0 in child and 'pid of child' in the parent.
Presently my (naive)understanding is that the %eax value is stored differently for the child and the parent.
Both the child and the parent returns from fork to the same instruction address, but will have different return values according to %eax.
Is my understanding correct?
Can somebody point out where exaclty in the source this is taken care of?
Thanks,
Mugunthan