rubyspec/rubyspec — pull request #275 by ioquatix (2014-05-15 02:00:43+00:00)
Title: Process.fork {} by default returns exit status zero.

This isn't tested anywhere so I thought it would be a good idea to include it.

As per the documentation:

Process.fork

Kernel.fork [{ block }] -> fixnum or nil
Process.fork [{ block }] -> fixnum or nil

Creates a subprocess. **If a block is specified, that block is run in the
subprocess, and the subprocess terminates with a status of zero.** Otherwise,
the fork call returns twice, once in the parent, returning the process ID of
the child, and once in the child, returning nil. The child process can
exit using Kernel.exit! to avoid running any at_exit functions. The parent
process should use Process.wait to collect the termination statuses of its
children or use Process.detach to register disinterest in their status;
otherwise, the operating system may accumulate zombie processes.