[MacRuby-devel] Please implement fork() ;-)

Laurent Sansonetti lsansonetti at apple.com
Thu Apr 15 20:10:19 PDT 2010


Hi Robert,

fork() itself is easy to implement, the problem is that the program can very easily crash if CoreFoundation or the GC is called inside the child process. This is the reason why we decided to mark it as not-implemented. I do not believe these problems will go away any time soon, I'm afraid.

fork() + immediately exec() should work, but I believe there is already something in Ruby core for that. Otherwise, we could expose something.

What's your use-case exactly? Maybe your problem can also be solved by spawning a new MacRuby process & communicate with it using NSTask.

Laurent

On Apr 15, 2010, at 7:46 PM, robert gleeson wrote:

> Hello,
> 
> I know it has been discussed before and I haven't really gotten a final word back on it yet. With the removal of the GIL, and Grand Central Dispatch fork() isn't really needed to achieve concurrency _but_ I have a particular use case that requires fork() and I'd love to implement my use-case in a MacRuby cocoa application.
> 
> I know fork() and CoreFoundation(iirc) can cause problems but if there is a work-around or solution I would _love_ to see it implemented.
> 
> Thanks,
> Rob
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list