Hacker News new | past | comments | ask | show | jobs | submit login

> For one or the other reason, fork() has become in many discussion of posix on windows something of a fetish.

how about this one?

fopen + mmap + unlink

Afaik windows APIs forbid deleting mmaped files.




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...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: