зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
523bd6737e
Коммит
94b120fe75
|
@ -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.
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче