LWN.net Logo

Day: GNOME OS

Day: GNOME OS

Posted Aug 9, 2012 15:41 UTC (Thu) by arafel (subscriber, #18557)
In reply to: Day: GNOME OS by nix
Parent article: Day: GNOME OS

I think you might have misread the blog post:

This process opens every file we might use and then waits for commands from the main process. When it's time to make a new subprocess we ask the helper, which forks itself again as the new child. By virtue of always forking from the same initial process, we guarantee that we are always running the same code; even if the files we opened are replaced by a system update our handle on them is the handle for the previous file.


(Log in to post comments)

Day: GNOME OS

Posted Aug 10, 2012 8:16 UTC (Fri) by nix (subscriber, #2304) [Link]

Oh yes, true enough. Of course the most important part of this is the 'always running the same code' part. You don't have to hold the files open: if there are lots of little ones you might prefer to suck them into memory instead.

(Obviously this model will not apply to everything, but it does in fact apply to a lot. You need an abstraction around file I/O to do it, but Chrome already *has* that, and thanks to libio and open_memstream() anything can get it quite easily, without major rewrites.)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds