diff --git a/process.c b/process.c index 31810d9669..3eb1ca4092 100644 --- a/process.c +++ b/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 Process.spawn 'echo', '$PATH' prints the * literal $PATH. * + * 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.