This is the mail archive of the libc-help@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]

Re: PID caching problem


On Tuesday 07 July 2009 09:24:27 michele alberti wrote:
> I'm working on a project whose goal is to capture the state of a
> running process in GNU/Linux and save it to a file. This file can then
> be used to resume the process later on, even after a reboot. The url
> to the prject page: http://sharesource.org/project/cryopid/
> 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.

this sounds like simply one edge case with the PID value.  fixing it wont fix 
all the other problems.  better to use the generic methods discussed on LKML 
for restoring processes at runtime with the original PID value.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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