LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reattaching to same address space on process restart (https://www.linuxquestions.org/questions/linux-newbie-8/reattaching-to-same-address-space-on-process-restart-863396/)

atul77 02-17-2011 04:24 PM

Reattaching to same address space on process restart
 
Hello Linux Gurus,
I have a question.

Suppose a process creates multiple shared
mem segments as part of it job.
Now is it always possible that on restart, that process can reattach to those previously created shared mem segments to the same virtual address spaces (returned on first time creation) ?

My intention is use pointers over shared memory.So on restart I want those pointers absolute value to remain valid.

Thanks a lot in advance.

kbp 02-17-2011 06:00 PM

I think you'd have to have the process spawn a child to perform the actual work, the parent would allocate the shared segments and deallocate them on exit - once you've lost a pointer there isn't any way to regain access to the memory afaik

cheers


All times are GMT -5. The time now is 01:14 AM.