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.
-
-
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 -
-
-
That's an improvement, I remember the same behaviour panicking the osx kernel 10-15Y ago
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
fd passing is a large can of worms. Who owns the fd in transit ? Nobody ? then you can get over ulimit by stashing fds. The receiver ? someone can DoS you by sending fds. over ulimit -> boom you can no longer open new files. You saw the problem with sender-as-owner...
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.