macOS and Windows both essentially have the concept of a “weak file descriptor” (in the former case due to a kernel bug): file descriptors that you must hold open in the creator process when you transfer them or they get corrupted somehow. These are the most evil things.
-
Show this thread
-
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.
3 replies 2 retweets 10 likesShow 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…
1 reply 1 retweet 4 likesShow 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
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.