⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Open3
/
View File Name :
pipeline_start-i.ri
U:RDoc::AnyMethod[iI"pipeline_start:ETI"Open3#pipeline_start;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"COpen3.pipeline_start starts a list of commands as a pipeline. ;TI"=No pipes are created for stdin of the first command and ;TI" stdout of the last command.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"DOpen3.pipeline_start(cmd1, cmd2, ... [, opts]) {|wait_threads| ;TI" ... ;TI"} ;TI" ;TI"Cwait_threads = Open3.pipeline_start(cmd1, cmd2, ... [, opts]) ;TI" ... ;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" # Run xeyes in 10 seconds. ;TI")Open3.pipeline_start("xeyes") {|ts| ;TI" sleep 10 ;TI" t = ts[0] ;TI"# Process.kill("TERM", t.pid) ;TI"E p t.value #=> #<Process::Status: pid 911 SIGTERM (signal 15)> ;TI"} ;TI" ;TI"3# Convert pdf to ps and send it to a printer. ;TI"1# Collect error message of pdftops and lpr. ;TI"pdf_file = "paper.pdf" ;TI"printer = "printer-name" ;TI"err_r, err_w = IO.pipe ;TI"6Open3.pipeline_start(["pdftops", pdf_file, "-"], ;TI"3 ["lpr", "-P#{printer}"], ;TI"- :err=>err_w) {|ts| ;TI" err_w.close ;TI"9 p err_r.read # error messages of pdftops and lpr. ;TI"};T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*cmds, &block);T@>FI" Open3;TcRDoc::NormalModule00