This question has come up on JRuby lists many times, and I thought I'd
take it to the JVM language crew:

Why doesn't the JVM support fork?

I understand the technical reasons: threads don't migrate, so they'd
have to be restarted (including GC, compiler, signals, finalizers,
etc); userland threads wouldn't be migratable at all; and I assume
there are aspects of JVMs' compilers or GCs that depend on specific
memory layout.

But fork is such a constant part of process management and
command-line tooling on Unix that people really don't like when JRuby
doesn't support it.

So, not that I'm saying this should happen, but I thought I'd raise
the questions:

* Should JVMs support forking?
* What would technically be needed to make it feasible on Hotspot, JRockit, J9?
* Are there "small" JVMs that can support forking right now? (I know
Dalvik can at some level, but I don't know the details. JamVM? Jato?)
* Am I totally made to want to be able to support fork(2) in JRuby?

FWIW, JRuby did *bind* fork up until recently, but you had to set a
property for it to be callable (and on Hotspot at least you needed to
disable other errors and warnings...but it *sorta* worked for a couple
seconds after forking). JRuby 1.6.0.RC2 will finally just remove it
altogether.

- Charlie

-- 
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.

Reply via email to