|
-
August 14th, 2009, 08:00 PM
#1
Retaining file mapping object after process exit
Hi,
I am writing a small library using Win32 APIs and it needs to provide Linux like shared memory support. Trying to use file mapping objects backed by system paging file
http://msdn.microsoft.com/en-us/libr...56(VS.85).aspx
Problem is even if the process does not explicitly close the handler to mapped object, it is destroyed when the process exists (guess Windows decrements the handle refcount when process exists and since it reaches 0, mapped object is destroyed). So another process which might start after the 1st process exited would not be able to see the mapped object. This behaviour is different from Linux implementation wherein the shared memory is not destroyed until shm_unlink is done explicitly. Is there a way to not have the file mapping object to be destroyed when the process exists (and no other handle to it is open from another process)
Thanks in advance
Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|