how fork returns value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux