Ralph S. wrote:
Is fork truly not implemented for 1.8.6 and Windows?
fork is a POSIX/Unix system call. It is therefore only available on
POSIX/Unix. This does not only apply to Ruby 1.8.6, but to all
versions of Ruby, and it not only applies to Windows, but to all
non-POSIX platforms including, for example, the JVM, the CLI, the
Flash VM or ECMAScript.
This surprised me (and still does) and I would consider this a bug,
but I saw a video of an interview with Yukihiro M. in which he
explained that this is in fact not a bug but a feature. Ruby is
deliberately not intended to be platform-independent, and the fact
that Ruby programs behave differently or don’t work at all when run
on a different operating system or even on the same operating system
and a different CPU is normal and expected.
Note: there are POSIX emulation layers for Windows, such as Cygwin or
Microsoft’s own Services for Unix. However, you will need to build
your execution engine specifically for those platforms if you want to
use them. Also, this doesn’t change the fact that processes in Windows
are used for completely different purposes than processes on Unix, and
thus have substantially different performance characteristics and
here are the various signals for ruby documented?
Again: those are POSIX signals. Which signals are available on which
platform depends on the platform, so you have to look in your
platform’s manual instead of Ruby’s. In this particular case, I assume
you are using the MinGW port of the MRI Ruby execution engine, so you
will find a list of the supported signals in the MinGW documentation.
(Actually, you probably won’t, since their documentation isn’t
particularly good. You’ll probably have to look through the source
In particular, the SIGCHILD signal is related to POSIX’s process
model, which doesn’t really apply on Windows.