Skip to content

Commit a40ab12

Browse files
BurdetteLamarpeterzhu2118
authored andcommitted
[DOC] Refactor doc in process.c
1 parent 8bbaa81 commit a40ab12

File tree

1 file changed

+22
-46
lines changed

1 file changed

+22
-46
lines changed

process.c

Lines changed: 22 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3090,21 +3090,7 @@ NORETURN(static VALUE f_exec(int c, const VALUE *a, VALUE _));
30903090
*
30913091
* Foo
30923092
*
3093-
* On a Unix-like system, the shell is <tt>/bin/sh</tt>;
3094-
* otherwise the shell is determined by environment variable
3095-
* <tt>ENV['RUBYSHELL']</tt>, if defined, or <tt>ENV['COMSPEC']</tt> otherwise.
3096-
*
3097-
* Except for the +COMSPEC+ case,
3098-
* the entire string +command_line+ is passed as an argument
3099-
* to {shell option -c}[https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/sh.html].
3100-
*
3101-
* The shell performs normal shell expansion on the command line:
3102-
*
3103-
* exec('echo C*')
3104-
*
3105-
* Output:
3106-
*
3107-
* CONTRIBUTING.md COPYING COPYING.ja
3093+
* See {Execution Shell}[rdoc-ref:Process@Shell] for details about the shell.
31083094
*
31093095
* Raises an exception if the new process could not execute.
31103096
*
@@ -4785,21 +4771,7 @@ rb_spawn(int argc, const VALUE *argv)
47854771
*
47864772
* Foo
47874773
*
4788-
* On a Unix-like system, the shell is <tt>/bin/sh</tt>;
4789-
* otherwise the shell is determined by environment variable
4790-
* <tt>ENV['RUBYSHELL']</tt>, if defined, or <tt>ENV['COMSPEC']</tt> otherwise.
4791-
*
4792-
* Except for the +COMSPEC+ case,
4793-
* the entire string +command_line+ is passed as an argument
4794-
* to {shell option -c}[https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/sh.html].
4795-
*
4796-
* The shell performs normal shell expansion on the command line:
4797-
*
4798-
* system('echo C*') # => true
4799-
*
4800-
* Output:
4801-
*
4802-
* CONTRIBUTING.md COPYING COPYING.ja
4774+
* See {Execution Shell}[rdoc-ref:Process@Shell] for details about the shell.
48034775
*
48044776
* Raises an exception if the new process could not execute.
48054777
*
@@ -4972,22 +4944,7 @@ rb_f_system(int argc, VALUE *argv, VALUE _)
49724944
*
49734945
* Foo
49744946
*
4975-
* On a Unix-like system, the shell is <tt>/bin/sh</tt>;
4976-
* otherwise the shell is determined by environment variable
4977-
* <tt>ENV['RUBYSHELL']</tt>, if defined, or <tt>ENV['COMSPEC']</tt> otherwise.
4978-
*
4979-
* Except for the +COMSPEC+ case,
4980-
* the entire string +command_line+ is passed as an argument
4981-
* to {shell option -c}[https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/sh.html].
4982-
*
4983-
* The shell performs normal shell expansion on the command line:
4984-
*
4985-
* spawn('echo C*') # => 799139
4986-
* Process.wait # => 799139
4987-
*
4988-
* Output:
4989-
*
4990-
* CONTRIBUTING.md COPYING COPYING.ja
4947+
* See {Execution Shell}[rdoc-ref:Process@Shell] for details about the shell.
49914948
*
49924949
* Raises an exception if the new process could not execute.
49934950
*
@@ -8973,6 +8930,25 @@ proc_warmup(VALUE _)
89738930
* Use execution option <tt>:close_others => true</tt> to modify that inheritance
89748931
* by closing non-standard fds (3 and greater) that are not otherwise redirected.
89758932
*
8933+
* === Execution Shell
8934+
*
8935+
* On a Unix-like system, the shell invoked is <tt>/bin/sh</tt>;
8936+
* otherwise the shell invoked is determined by environment variable
8937+
* <tt>ENV['RUBYSHELL']</tt>, if defined, or <tt>ENV['COMSPEC']</tt> otherwise.
8938+
*
8939+
* Except for the +COMSPEC+ case,
8940+
* the entire string +command_line+ is passed as an argument
8941+
* to {shell option -c}[https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/sh.html].
8942+
*
8943+
* The shell performs normal shell expansion on the command line:
8944+
*
8945+
* spawn('echo C*') # => 799139
8946+
* Process.wait # => 799139
8947+
*
8948+
* Output:
8949+
*
8950+
* CONTRIBUTING.md COPYING COPYING.ja
8951+
*
89768952
* == What's Here
89778953
*
89788954
* === Current-Process Getters

0 commit comments

Comments
 (0)