[DOC] Move exe_path
example to Process
module document
Exchanged with `Kernel.spawn`, like as `Kernel.exec` and `Kernel.system`. This description should be common for these methods.
This commit is contained in:
parent
df5f2fab93
commit
828f3ecfcd
36
process.c
36
process.c
@ -4972,24 +4972,16 @@ rb_f_system(int argc, VALUE *argv, VALUE _)
|
|||||||
*
|
*
|
||||||
* Argument +exe_path+ is one of the following:
|
* Argument +exe_path+ is one of the following:
|
||||||
*
|
*
|
||||||
* - The string path to an executable to be called:
|
* - The string path to an executable to be called.
|
||||||
|
* - A 2-element array containing the path to an executable to be called,
|
||||||
|
* and the string to be used as the name of the executing process.
|
||||||
*
|
*
|
||||||
* spawn('/usr/bin/date') # Path to date on Unix-style system.
|
* spawn('/usr/bin/date') # Path to date on Unix-style system.
|
||||||
* Process.wait
|
* Process.wait
|
||||||
*
|
*
|
||||||
* Output:
|
* Output:
|
||||||
*
|
*
|
||||||
* Thu Aug 31 10:06:48 AM CDT 2023
|
* Mon Aug 28 11:43:10 AM CDT 2023
|
||||||
*
|
|
||||||
* - A 2-element array containing the path to an executable
|
|
||||||
* and the string to be used as the name of the executing process:
|
|
||||||
*
|
|
||||||
* pid = spawn(['sleep', 'Hello!'], '1') # 2-element array.
|
|
||||||
* p `ps -p #{pid} -o command=`
|
|
||||||
*
|
|
||||||
* Output:
|
|
||||||
*
|
|
||||||
* "Hello! 1\n"
|
|
||||||
*
|
*
|
||||||
* Ruby invokes the executable directly.
|
* Ruby invokes the executable directly.
|
||||||
* This form does not use the shell;
|
* This form does not use the shell;
|
||||||
@ -8877,18 +8869,28 @@ proc_warmup(VALUE _)
|
|||||||
*
|
*
|
||||||
* Argument +exe_path+ is one of the following:
|
* Argument +exe_path+ is one of the following:
|
||||||
*
|
*
|
||||||
* - The string path to an executable to be called.
|
* - The string path to an executable to be called:
|
||||||
* - A 2-element array containing the path to an executable to be called,
|
|
||||||
* and the string to be used as the name of the executing process.
|
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
*
|
*
|
||||||
* system('/usr/bin/date') # => true # Path to date on Unix-style system.
|
* system('/usr/bin/date') # => true # Path to date on Unix-style system.
|
||||||
* system('foo') # => nil # Command failed.
|
* system('foo') # => nil # Command execlution failed.
|
||||||
*
|
*
|
||||||
* Output:
|
* Output:
|
||||||
*
|
*
|
||||||
* Mon Aug 28 11:43:10 AM CDT 2023
|
* Thu Aug 31 10:06:48 AM CDT 2023
|
||||||
|
*
|
||||||
|
* - A 2-element array containing the path to an executable
|
||||||
|
* and the string to be used as the name of the executing process:
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
*
|
||||||
|
* pid = spawn(['sleep', 'Hello!'], '1') # 2-element array.
|
||||||
|
* p `ps -p #{pid} -o command=`
|
||||||
|
*
|
||||||
|
* Output:
|
||||||
|
*
|
||||||
|
* "Hello! 1\n"
|
||||||
*
|
*
|
||||||
* === Execution Options
|
* === Execution Options
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user