Re: return value by do_fork()!!

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

 



* Ketan Mukadam (ketan@iitk.ac.in) wrote:
> 
> But how does child gets a return value of zero?

see copy_thread().  i386, for example, does 'childregs->eax = 0;' where
eax is the register that contains the return value when returning to
userspace.

-chris
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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