зеркало из https://github.com/github/ruby.git
[DOC] Tips for space containing `exe_path`
This commit is contained in:
Родитель
623058649e
Коммит
769bb924b2
14
process.c
14
process.c
|
@ -8876,6 +8876,11 @@ proc_warmup(VALUE _)
|
|||
*
|
||||
* Thu Aug 31 10:06:48 AM CDT 2023
|
||||
*
|
||||
* A path or command name containing spaces without arguments cannot
|
||||
* be distinguished from +command_line+ above, so you must quote or
|
||||
* escape the entire command name using a shell in platform
|
||||
* dependent manner, or use the array form below.
|
||||
*
|
||||
* - A 2-element array containing the path to an executable
|
||||
* and the string to be used as the name of the executing process:
|
||||
*
|
||||
|
@ -8922,6 +8927,15 @@ proc_warmup(VALUE _)
|
|||
* Windows, but <code>Process.spawn 'echo', '$PATH'</code> prints the
|
||||
* literal <tt>$PATH</tt>.
|
||||
*
|
||||
* If you want to invoke a path containing spaces with no arguments
|
||||
* without shell, you will need to use a 2-element array +exe_path+.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* path = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
|
||||
* spawn(path) # Raises Errno::ENOENT; No such file or directory - /Applications/Google
|
||||
* spawn([path] * 2)
|
||||
*
|
||||
* === Execution Options
|
||||
*
|
||||
* Optional trailing argument +options+ is a hash of execution options.
|
||||
|
|
Загрузка…
Ссылка в новой задаче