Skip to content

Commit

Permalink
Add documentation to fork()
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
dave committed Sep 21, 2004
1 parent f427cf9 commit 141dae1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Wed Sep 22 00:11:12 2004 Dave Thomas <[email protected]>

* process.c: Add documentation for fork()

Mon Sep 20 17:46:51 2004 Minero Aoki <[email protected]>

* ext/ripper/lib/ripper/tokenizer.rb: fix typo.
Expand Down
13 changes: 12 additions & 1 deletion process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1416,9 +1416,20 @@ rb_fork(status, chfunc, charg)

/*
* call-seq:
* Kernel.fork [{ block }] => fixnum or nil
* Process.fork [{ block }] => fixnum or nil
*
* See <code>Kernel::fork</code>.
* 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
* <code>Kernel.exit!</code> to avoid running any
* <code>at_exit</code> functions. The parent process should
* use <code>Process.wait</code> to collect the termination statuses
* of its children or use <code>Process.detach</code> to register
* disinterest in their status; otherwise, the operating system
* may accumulate zombie processes.
*/

static VALUE
Expand Down

0 comments on commit 141dae1

Please sign in to comment.