Eric Wong wrote:
> fork() seems hacky now that Ractor exists, and
> Process.spawn/popen/system use vfork (along with cloexec being
> the default)

<snip>

> With Ractor, perhaps fork() shouldn't be encouraged/promoted, anymore.

Expanding on that:  fork() is a middle-of-the-road approach;
like roadkill, it gets run over from both sides.

Ractor uses less memory, starts faster, and makes sharing data easier.

Process.spawn can give the ultimate in isolation and data safety
(at the expense of startup performance).

fork() has high/unpredictable memory use and performance
dependent on CoW (which is still tricky to predict and control).
It also has difficult and expensive data sharing; along with
potential for inadvertant data leaks.


By the time users adopt a new Ruby API for atfork, I think
they'd be better served by moving to Ractor, instead.

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>