| Server IP : 162.214.74.102 / Your IP : 216.73.217.46 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Open3/ |
Upload File : |
U:RDoc::AnyMethod[iI"pipeline_r:EFI"Open3#pipeline_r;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"JOpen3.pipeline_r starts a list of commands as a pipeline with a pipe ;TI"2which connects to stdout of the last command.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"MOpen3.pipeline_r(cmd1, cmd2, ... [, opts]) {|last_stdout, wait_threads|
;TI" ...
;TI"}
;TI"
;TI"Llast_stdout, wait_threads = Open3.pipeline_r(cmd1, cmd2, ... [, opts])
;TI" ...
;TI"last_stdout.close
;T:@format0o;
; [I"'Each cmd is a string or an array. ;TI"AIf it is an array, the elements are passed to Process.spawn.;T@o;; [I"
cmd:
;TI"_ commandline command line string which is passed to a shell
;TI"_ [env, commandline, opts] command line string which is passed to a shell
;TI"b [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell)
;TI"h [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell)
;TI"
;TI"@Note that env and opts are optional, as for Process.spawn.
;T;
0o;
; [I"
Example:;T@o;; [I"?Open3.pipeline_r("zcat /var/log/apache2/access.log.*.gz",
;TI"C [{"LANG"=>"C"}, "grep", "GET /favicon.ico"],
;TI"- "logresolve") {|o, ts|
;TI" o.each_line {|line|
;TI"
...
;TI" }
;TI"}
;TI"
;TI"2Open3.pipeline_r("yes", "head -10") {|o, ts|
;TI": p o.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n"
;TI"K p ts[0].value #=> #<Process::Status: pid 24910 SIGPIPE (signal 13)>
;TI"> p ts[1].value #=> #<Process::Status: pid 24913 exit 0>
;TI"};T;
0:
@fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*cmds, **opts, &block);T@8FI"
Open3;FcRDoc::NormalModule00