With FILE_SHARE_DELETE there shouldn't be any particular problem, but I certainly want to test this with the posix flags you had in mind. Do you happen to have a minimal example that you deem problematic on Windows?
If you delete the backing file of (or perhaps even close its handle -- I don't remember) a memory-mapped file, you get VERY bizarre behavior in Windows. I don't remember what it was, but I remember I did it and the behavior I got was quite nonsensical.
has been a while since I tried it. it was basically
open rw, set length, mmap from two 2 processes to have shared memory, unlink & close.
expected behavior is to have a chunk of shared memory without the tempfile in the directory tree
Not if they are opened with FILE_SHARE_DELETE.
right, but it's still not the same as unlink it seems: http://blogs.msdn.com/b/oldnewthing/archive/2004/06/07/15004...
how about this one?
fopen + mmap + unlink
Afaik windows APIs forbid deleting mmaped files.