⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
IO
/
View File Name :
pipe-c.ri
U:RDoc::AnyMethod[iI" pipe:ETI" IO::pipe;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"DCreates a pair of pipe endpoints (connected to each other) and ;TI"8returns them as a two-element array of IO objects: ;TI"C
[
read_io
,
write_io
]
.;To:RDoc::Markup::BlankLine o; ; [ I"2If a block is given, the block is called and ;TI"%returns the value of the block. ;TI"L
read_io
and
write_io
are sent to the block as arguments. ;TI"SIf read_io and write_io are not closed when the block exits, they are closed. ;TI"Ai.e. closing read_io and/or write_io doesn't cause an error.;T@o; ; [I"$Not available on all platforms.;T@o; ; [I"]If an encoding (encoding name or encoding object) is specified as an optional argument, ;TI"Bread string from pipe is tagged with the encoding specified. ;TI"DIf the argument is a colon separated two encoding names "A:B", ;TI"Fthe read string is converted from encoding A (external encoding) ;TI"
rd.read will never return if it ;TI"2does not first issue a
wr.close
.;T@o:RDoc::Markup::Verbatim; [I"rd, wr = IO.pipe ;TI" ;TI" if fork ;TI" wr.close ;TI"' puts "Parent got: <#{rd.read}>" ;TI" rd.close ;TI" Process.wait ;TI" else ;TI" rd.close ;TI"( puts "Sending message to parent" ;TI" wr.write "Hi Dad" ;TI" wr.close ;TI" end ;T:@format0o; ; [I"
produces:
;T@o;; [I"Sending message to parent ;TI"Parent got:
;T; 0: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"IO.pipe -> [read_io, write_io] IO.pipe(ext_enc) -> [read_io, write_io] IO.pipe("ext_enc:int_enc" [, opt]) -> [read_io, write_io] IO.pipe(ext_enc, int_enc [, opt]) -> [read_io, write_io] IO.pipe(...) {|read_io, write_io| ... } ;T0[ I" (p1 = v1, p2 = v2, p3 = {});T@FFI"IO;TcRDoc::NormalClass00