This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: PID caching problem
Hi all,
> The save file stores all needed information: registers, file
> descriptors, signal handler, TLS (Thread Local Storage), VMA etc.
> Here comes a problem with PID caching. If the process to capture calls
> a getpid (the glibc wrapper),the PID is cached.
> The "frozen" process stores everything, even the cached PID value.
> When the frozen process tries to resume, it uses the previous (old,
> cached) PID, which is incorrect. The call to getpid() still returns
> the original PID even though the restored process has gotten a new
> one.
I only want that getpid() returns the real PID, the new one. Because
old, cached PID is useless, for example raise() syscall fail.
I don't require the original PID, but the right one.
Thanks to all.
michele