U:RDoc::AnyMethod[iI" open:ETI"PTY::open;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"'Allocates a pty (pseudo-terminal).;To:RDoc::Markup::BlankLineo; ; [I"LIn the block form, yields two arguments master_io, slave_file ;TI"8and the value of the block is returned from +open+.;T@o; ; [I"OThe IO and File are both closed after the block completes if they haven't ;TI"been already closed.;T@o:RDoc::Markup::Verbatim; [ I"PTY.open {|master, slave| ;TI"4 p master #=> # ;TI"+ p slave #=> # ;TI"% p slave.path #=> "/dev/pts/1" ;TI"} ;T: @format0o; ; [I"IIn the non-block form, returns a two element array, [master_io, ;TI"slave_file].;T@o; ; [I"master, slave = PTY.open ;TI":# do something with master for IO, or the slave file ;T; 0o; ; [I"%The arguments in both forms are:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+master_io+;T; [o; ; [I"%the master of the pty, as an IO.;To;;[I"+slave_file+;T; [o; ; [I"7the slave of the pty, as a File. The path to the ;TI"7terminal device is available via +slave_file.path+;T@o; ; [I"6IO#raw! is usable to disable newline conversions:;T@o; ; [ I"require 'io/console' ;TI"PTY.open {|m, s| ;TI" s.raw! ;TI" ... ;TI"};T; 0: @fileI"ext/pty/pty.c;T:0@omit_headings_from_table_of_contents_below0I"`PTY.open => [master_io, slave_file] PTY.open {|master_io, slave_file| ... } => block value ;T0[I"();T@DFI"PTY;TcRDoc::NormalModule00