So to elaborate: On at least some versions of macOS, if you use the POSIX sendmsg(2) API to send a file descriptor over a Unix domain socket, and you close the fd before the other side has received the message, the fd inside the message will become useless. Very annoying bug.
-
-
Show this thread
-
On Windows, you can effectively get a handle to some graphics memory by creating a D3D11 texture with the SHARED flag. This gives you a HANDLE (basically an fd) that you can use to open that memory for read/write in another process. Nice, except…
Show this thread -
…if you destroy the texture before another process has opened it, then the HANDLE becomes invalid. Same problem! Microsoft fixed this, sort of, by introducing a new flag in D3D 11.1, SHARED_NTHANDLE, with sensible semantics. But only on D3D 11.1.pic.twitter.com/6bVEZMbcc7
Show this thread
End of conversation
New conversation -
-
-
Ooh! I’ve been looking for a way to simulate windows fd semantics on macOS (after losing a bunch of time tracking down bizarre lock bugs that only showed up on windows under conditions we didn’t CI there). Seems doable in dtrace with SIP off, but that’s not ideal.
-
I don’t *think* you’ll hit them unless you’re creating file descriptors that refer to GPU memory.
End of conversation
New conversation -
-
-
Wait what?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.