This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Q: How do I tell libc to refresh it's pid cache.


I have been playing with implementing a user space a variation of fork
where the child process shows up on a remote machine.  Currently it
works fairly well, but getpid reports the pid of the process before
I copy it between machines.  Since in this instance I'm not trying to
hide the fact that the application moved between machines and
changed it's pid value this is a problem.

Is there a good way to have glibc refresh it's pid cache besides
calling fork an additional time?

If I could figure out how I would just write to the PID value,
But that variable appears not to be exported.  I'm single threaded
at the time so there shouldn't be any thread issues to make this
difficult.

I'm honestly confused at why we cache one of the cheapest syscalls,
but since we are how do I tell it to refresh it's cache?

Eric


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