This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Calls to getpid() in clone'd child return parent's pid.


On 9/13/06, Daniel Jacobowitz <drow@false.org> wrote:
Failure to handle RESET_PID in your clone.S, maybe?

That is correct, we are not handling RESET_PID at all. After reading a couple of implementations it looks like we need to do the following:

#ifdef RESET_PID
- In the cloned child, before calling the clones function.
- Skip this if CLONE_THREAD or CLONE_VM
- Call the getpid syscall, and store the result in PID and TID (tcb-offsets.h).
#endif

Does that look right?

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]