diff --git a/ChangeLog b/ChangeLog index 6ba607e902..97c63c9b6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Sep 22 00:11:12 2004 Dave Thomas + + * process.c: Add documentation for fork() + Mon Sep 20 17:46:51 2004 Minero Aoki * ext/ripper/lib/ripper/tokenizer.rb: fix typo. diff --git a/process.c b/process.c index 662b26d7cb..b7be36fbf7 100644 --- a/process.c +++ b/process.c @@ -1416,9 +1416,20 @@ rb_fork(status, chfunc, charg) /* * call-seq: + * Kernel.fork [{ block }] => fixnum or nil * Process.fork [{ block }] => fixnum or nil * - * See Kernel::fork. + * 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. */ static VALUE