Skip to content

Commit be6e06e

Browse files
committed
[DOC] Separate standard shells per platforms
1 parent 828f3ec commit be6e06e

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

process.c

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9025,21 +9025,31 @@ proc_warmup(VALUE _)
90259025
* === Execution Shell
90269026
*
90279027
* On a Unix-like system, the shell invoked is <tt>/bin/sh</tt>;
9028-
* otherwise the shell invoked is determined by environment variable
9029-
* <tt>ENV['RUBYSHELL']</tt>, if defined, or <tt>ENV['COMSPEC']</tt> otherwise.
9030-
*
9031-
* Except for the +COMSPEC+ case,
90329028
* the entire string +command_line+ is passed as an argument
90339029
* to {shell option -c}[https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/sh.html].
90349030
*
90359031
* The shell performs normal shell expansion on the command line:
90369032
*
9037-
* spawn('echo C*') # => 799139
9038-
* Process.wait # => 799139
9033+
* Example:
9034+
*
9035+
* system('echo $SHELL: C*') # => true
9036+
*
9037+
* Output:
9038+
*
9039+
* /bin/bash: CONTRIBUTING.md COPYING COPYING.ja
9040+
*
9041+
* On Windows, the shell invoked is determined by environment variable
9042+
* +RUBYSHELL+, if defined, or +COMSPEC+ otherwise. The standard
9043+
* shell +cmd.exe+ performs environment variable expansion but does
9044+
* not have globbing functionality:
9045+
*
9046+
* Example:
9047+
*
9048+
* system("echo %COMSPEC%: C*")' # => true
90399049
*
90409050
* Output:
90419051
*
9042-
* CONTRIBUTING.md COPYING COPYING.ja
9052+
* C:\WINDOWS\system32\cmd.exe: C*
90439053
*
90449054
* == What's Here
90459055
*

0 commit comments

Comments
 (0)