netmcore: becoming a worker after fork+exec ?
Piotr Mardziel <[email protected]> Sat, 7 Sep 2013 00:16:30 -0400
| Newsgroups | gmane.comp.lang.ocaml.lib.net.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello ocamlnet developers, Is it possible to establish the master/worker relationship with a process that has been fork+exec'ed (or Netsys_posix.spawn'ed) but is of the same executable as the process doing Netmcore.startup ? Let me explain. There is a problem on OSX in that forked child processes cannot access some OS functionality (for example SDL will not work on a forked child process). One has to exec in order to get this functionality back. I would like to be able to communicate with this process (of the same executable if need be) using the convenient netmcore modules but I don't see a way for this process to get a handle on resources managed by the master process. It seems like it is easy to get as far as the getting a handle to the shared memory from which a Netmcore_mempool is created (by simply passing its name as a command argument to exec), but one cannot actually create the resource suitable for interacting with the master and other workers, as far as I can tell. Any info about this would be greatly appreciated. Best, Piotr (Peter) Mardziel <[email protected]> http://www.cs.umd.edu/~piotrm ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk