News for hackers. Stuff that matters.
Re:Midipix: Posix for Windows by the8472 on Wednesday June 03, 2015 @11:38AM (#9653351)
> 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.

Re:Midipix: Posix for Windows by mpixorg on Wednesday June 03, 2015 @01:01PM (#9654068)
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?
Re:Midipix: Posix for Windows by wfunction on Wednesday June 03, 2015 @10:43PM (#9657153)
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.
Re:Midipix: Posix for Windows by the8472 on Wednesday June 03, 2015 @01:18PM (#9654228)
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

Re:Midipix: Posix for Windows by poizan42 on Wednesday June 03, 2015 @12:46PM (#9653915)
Not if they are opened with FILE_SHARE_DELETE.
Re:Midipix: Posix for Windows by the8472 on Wednesday June 03, 2015 @12:56PM (#9654008)
right, but it's still not the same as unlink it seems: http://blogs.msdn.com/b/oldnewthing/archive/2004/06/07/15004...