[DOC] Correction for Process.spawn doc
This commit is contained in:
parent
c16aaf119a
commit
df5f2fab93
12
process.c
12
process.c
@ -4991,7 +4991,9 @@ rb_f_system(int argc, VALUE *argv, VALUE _)
|
|||||||
*
|
*
|
||||||
* "Hello! 1\n"
|
* "Hello! 1\n"
|
||||||
*
|
*
|
||||||
* Ruby invokes the executable directly, with no shell and no shell expansion.
|
* Ruby invokes the executable directly.
|
||||||
|
* This form does not use the shell;
|
||||||
|
* see below for caveats.
|
||||||
*
|
*
|
||||||
* If one or more +args+ is given, each is an argument or option
|
* If one or more +args+ is given, each is an argument or option
|
||||||
* to be passed to the executable:
|
* to be passed to the executable:
|
||||||
@ -5006,6 +5008,14 @@ rb_f_system(int argc, VALUE *argv, VALUE _)
|
|||||||
* C*
|
* C*
|
||||||
* hello world
|
* hello world
|
||||||
*
|
*
|
||||||
|
* The 'cmdname, arg1, ...' form does not use the shell. However,
|
||||||
|
* on different OSes, different things are provided as built-in
|
||||||
|
* commands. An example of this is 'echo', which is a built-in
|
||||||
|
* on Windows, but is a normal program on Linux and Mac OS X.
|
||||||
|
* This means that `Process.spawn 'echo', '%Path%'` will display
|
||||||
|
* the contents of the `%Path%` environment variable on Windows,
|
||||||
|
* but `Process.spawn 'echo', '$PATH'` prints the literal '$PATH'.
|
||||||
|
*
|
||||||
* Raises an exception if the new process could not execute.
|
* Raises an exception if the new process could not execute.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user