summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-03 02:37:34 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-03 02:37:34 +0000
commit94b120fe7558f1b0dac644e096d8addf0e7f720a (patch)
tree7b2b3f04ca3892589047bc26bef198d098d54732 /process.c
parent523bd6737ea97bce1f92d2e171a09cc564b50125 (diff)
add some rdoc
* add reference to spawn to fork * add an example which runs ruby git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/process.c b/process.c
index 40ecfa6e2f..4ab1f647e9 100644
--- a/process.c
+++ b/process.c
@@ -3462,6 +3462,9 @@ rb_fork_ruby(int *status)
* fork doesn't copy other threads.
*
* If fork is not usable, Process.respond_to?(:fork) returns false.
+ *
+ * Note that fork(2) is not avaiable on some platforms like Windows and NetBSD 4.
+ * Therefore you should use spawn() instead of fork().
*/
static VALUE
@@ -3819,6 +3822,9 @@ rb_f_system(int argc, VALUE *argv)
* pid = spawn("tar xf ruby-2.0.0-p195.tar.bz2")
* Process.wait pid
*
+ * pid = spawn(RbConfig.ruby, "-eputs'Hello, world!'")
+ * Process.wait pid
+ *
* This method is similar to Kernel#system but it doesn't wait for the command
* to finish.
*