diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-03 02:37:34 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-03 02:37:34 +0000 |
commit | 94b120fe7558f1b0dac644e096d8addf0e7f720a (patch) | |
tree | 7b2b3f04ca3892589047bc26bef198d098d54732 /process.c | |
parent | 523bd6737ea97bce1f92d2e171a09cc564b50125 (diff) | |
download | ruby-94b120fe7558f1b0dac644e096d8addf0e7f720a.tar.gz |
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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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. * |