On Fri, Jun 19, 2015 at 3:21 AM, Robert O'Callahan <rob...@ocallahan.org> wrote:
> On Fri, Jun 19, 2015 at 7:10 PM, Patrick Walton <pwal...@mozilla.com> > wrote: > > > In theory you can use cmsg on POSIX systems to send channels over > > channels, by treating channels as file descriptors. I tried this first, > and > > I believe it actually worked well on Linux. But on Mac I ran into all > sorts > > of (as far as I can tell) kernel bugs, including kernel panics and data > > loss. It might still be possible by using Mach ports instead on the Mac > > (and I started to sketch that code), but I eventually figured it was > going > > to be cleaner to just stop sending channels over channels across process > > boundaries. > > > > Firefox IPDL sends file descriptors over sockets on Mac using cmsg. There > is a kernel bug where an in-flight file descriptor is not kept open by the > kernel, so you must keep it open on the sender side until the message is > acknowledged. I don't know about any kernel panics related to that feature. > Patrick, if you look at the various stuff in the chromium IPC directory that is guarded by ifdef OS_MACOSX, you can see some of the workarounds. For instance: http://mxr.mozilla.org/mozilla-central/source/ipc/chromium/src/chrome/common/ipc_channel_posix.cc#592 > On Windows you should be able to rig something up using DuplicateHandle. I > think Firefox uses this on Windows but I'm not sure. > > Rob > -- > oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo > owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo > osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo > owohooo > osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o > oioso > oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo > owohooo > osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro > ooofo > otohoeo ofoioroeo ooofo ohoeololo. > _______________________________________________ > dev-servo mailing list > dev-servo@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-servo > _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo