@@ -1233,9 +1233,20 @@ rb_f_exec(argc, argv)
1233
1233
1234
1234
/*
1235
1235
* call-seq:
1236
+ * Kernel.fork [{ block }] => fixnum or nil
1236
1237
* Process.fork [{ block }] => fixnum or nil
1237
- *
1238
- * See <code>Kernel::fork</code>.
1238
+ *
1239
+ * Creates a subprocess. If a block is specified, that block is run
1240
+ * in the subprocess, and the subprocess terminates with a status of
1241
+ * zero. Otherwise, the +fork+ call returns twice, once in
1242
+ * the parent, returning the process ID of the child, and once in
1243
+ * the child, returning _nil_. The child process can exit using
1244
+ * <code>Kernel.exit!</code> to avoid running any
1245
+ * <code>at_exit</code> functions. The parent process should
1246
+ * use <code>Process.wait</code> to collect the termination statuses
1247
+ * of its children or use <code>Process.detach</code> to register
1248
+ * disinterest in their status; otherwise, the operating system
1249
+ * may accumulate zombie processes.
1239
1250
*/
1240
1251
1241
1252
static VALUE
@@ -1416,6 +1427,7 @@ rb_f_system(argc, argv)
1416
1427
if (RARRAY (argv [0 ])-> len != 2 ) {
1417
1428
rb_raise (rb_eArgError , "wrong first argument" );
1418
1429
}
1430
+ * Kernel .fork [{ block }] = > fixnum or nil
1419
1431
prog = RARRAY (argv [0 ])-> ptr [0 ];
1420
1432
argv [0 ] = RARRAY (argv [0 ])-> ptr [1 ];
1421
1433
}
0 commit comments