On 04/07/2015 06:06 PM, Robert O'Callahan wrote: > On Wed, Apr 8, 2015 at 8:00 AM, <andreas....@gmail.com> wrote: >> Not sure do what degree we can replicate on Windows what we do on >> FFOS to launch content processes. > > The Cygwin people have looked into fork() in Windows a bit. Some > links: > http://www.cygwin.com/ml/cygwin-developers/2011-04/msg00036.html > https://github.com/kaniini/win32-fork/blob/master/fork.c It doesn't > look promising. Maybe if would work if we ever get to the point > where a content process doesn't need to use any Win32 APIs.
Even if you used something like Cygwin's fork(), it wouldn't help you, since their implementation isn't copy-on-write: "Currently, the Cygwin fork is a non-copy-on-write implementation similar to what was present in early flavors of UNIX."[1] As far as I know, it's flat-out *impossible* to implement copy-on-write process creation using the Win32 API (and if it's not actually impossible, it's pretty close). The NT API is another story, but unless you want to use Windows Services for UNIX / Interix, you're probably not going to get access to the NT kernel features you'd need to do it. > We might be able to do something Nuwa-like where Gecko subsystems > use an explicit shared data segment which is a copy-on-write view of > a file. I agree. Shared memory (e.g. CreateFileMapping[2]?) seems like the closest thing on Windows, although that's a part of the Win32 API I've never touched. - Jim [1] http://www.cygwin.com/cygwin-ug-net/highlights.html [2] https://msdn.microsoft.com/en-us/library/windows/desktop/aa366539%28v=vs.85%29.aspx _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform