Re: Nuwa on desktop

2015-04-07 Thread Jim Porter
On 04/07/2015 06:06 PM, Robert O'Callahan wrote:
> On Wed, Apr 8, 2015 at 8:00 AM,  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


Nuwa on desktop

2015-04-07 Thread Robert O'Callahan
On Wed, Apr 8, 2015 at 8:00 AM,  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.

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.

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 ofolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform