aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2023-09-26 15:01:44 +0100
committerPeter Zhu <peter@peterzhu.ca>2023-09-26 11:26:19 -0400
commita40ab12768a47135fff9eafdfb445506e806a20e (patch)
tree7a289a31799c26742d72d40c4d1b97e0668110a1 /process.c
parent8bbaa81454c631508071439ec5f18a0cdb87b081 (diff)
downloadruby-a40ab12768a47135fff9eafdfb445506e806a20e.tar.gz
[DOC] Refactor doc in process.c
Diffstat (limited to 'process.c')
-rw-r--r--process.c68
1 files changed, 22 insertions, 46 deletions
diff --git a/process.c b/process.c
index 690872ad36..64e0e94510 100644
--- a/process.c
+++ b/process.c
@@ -3090,21 +3090,7 @@ NORETURN(static VALUE f_exec(int c, const VALUE *a, VALUE _));
*
* Foo
*
- * On a Unix-like system, the shell is <tt>/bin/sh</tt>;
- * otherwise the shell is determined by environment variable
- * <tt>ENV['RUBYSHELL']</tt>, if defined, or <tt>ENV['COMSPEC']</tt> otherwise.
- *
- * Except for the +COMSPEC+ case,
- * the entire string +command_line+ is passed as an argument
- * to {shell option -c}[https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/sh.html].
- *
- * The shell performs normal shell expansion on the command line:
- *
- * exec('echo C*')
- *
- * Output:
- *
- * CONTRIBUTING.md COPYING COPYING.ja
+ * See {Execution Shell}[rdoc-ref:Process@Shell] for details about the shell.
*
* Raises an exception if the new process could not execute.
*
@@ -4785,21 +4771,7 @@ rb_spawn(int argc, const VALUE *argv)
*
* Foo
*
- * On a Unix-like system, the shell is <tt>/bin/sh</tt>;
- * otherwise the shell is determined by environment variable
- * <tt>ENV['RUBYSHELL']</tt>, if defined, or <tt>ENV['COMSPEC']</tt> otherwise.
- *
- * Except for the +COMSPEC+ case,
- * the entire string +command_line+ is passed as an argument
- * to {shell option -c}[https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/sh.html].
- *
- * The shell performs normal shell expansion on the command line:
- *
- * system('echo C*') # => true
- *
- * Output:
- *
- * CONTRIBUTING.md COPYING COPYING.ja
+ * See {Execution Shell}[rdoc-ref:Process@Shell] for details about the shell.
*
* Raises an exception if the new process could not execute.
*
@@ -4972,22 +4944,7 @@ rb_f_system(int argc, VALUE *argv, VALUE _)
*
* Foo
*
- * On a Unix-like system, the shell is <tt>/bin/sh</tt>;
- * otherwise the shell is determined by environment variable
- * <tt>ENV['RUBYSHELL']</tt>, if defined, or <tt>ENV['COMSPEC']</tt> otherwise.
- *
- * Except for the +COMSPEC+ case,
- * the entire string +command_line+ is passed as an argument
- * to {shell option -c}[https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/sh.html].
- *
- * The shell performs normal shell expansion on the command line:
- *
- * spawn('echo C*') # => 799139
- * Process.wait # => 799139
- *
- * Output:
- *
- * CONTRIBUTING.md COPYING COPYING.ja
+ * See {Execution Shell}[rdoc-ref:Process@Shell] for details about the shell.
*
* Raises an exception if the new process could not execute.
*
@@ -8973,6 +8930,25 @@ proc_warmup(VALUE _)
* Use execution option <tt>:close_others => true</tt> to modify that inheritance
* by closing non-standard fds (3 and greater) that are not otherwise redirected.
*
+ * === Execution Shell
+ *
+ * On a Unix-like system, the shell invoked is <tt>/bin/sh</tt>;
+ * otherwise the shell invoked is determined by environment variable
+ * <tt>ENV['RUBYSHELL']</tt>, if defined, or <tt>ENV['COMSPEC']</tt> otherwise.
+ *
+ * Except for the +COMSPEC+ case,
+ * the entire string +command_line+ is passed as an argument
+ * to {shell option -c}[https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/sh.html].
+ *
+ * The shell performs normal shell expansion on the command line:
+ *
+ * spawn('echo C*') # => 799139
+ * Process.wait # => 799139
+ *
+ * Output:
+ *
+ * CONTRIBUTING.md COPYING COPYING.ja
+ *
* == What's Here
*
* === Current-Process Getters