U:RDoc::NormalModule[iI"PTY:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"read, :out=>slave) ;TI",read.close # we dont need the read ;TI"#slave.close # or the slave ;TI" ;TI"'# pipe "42" to the factor command ;TI"write.puts "42" ;TI"'# output the response from factor ;TI"%p master.gets #=> "42: 2 3 7\n" ;TI" ;TI"7# pipe "144" to factor and print out the response ;TI"write.puts "144" ;TI",p master.gets #=> "144: 2 2 2 2 3 3\n" ;TI""write.close # close the pipe ;TI" ;TI"I# The result of read operation when pty slave is closed is platform ;TI"# dependent. ;TI"ret = begin ;TI"4 master.gets # FreeBSD returns nil. ;TI"5 rescue Errno::EIO # GNU/Linux raises EIO. ;TI" nil ;TI" end ;TI"p ret #=> nil ;T: @format0S; ; i; I" License;T@o;;[I"'C) Copyright 1998 by Akinori Ito. ;TI" ;TI"IThis software may be redistributed freely for this purpose, in full ;TI"Hor in part, provided that this entire copyright notice is included ;TI"Non any copies of this software and applications and derivations thereof. ;TI" ;TI"LThis software is provided on an "as is" basis, without warranty of any ;TI"Lkind, either expressed or implied, as to any matter including, but not ;TI"Glimited to warranty of fitness of purpose, or merchantability, or ;TI"0results obtained from use of this software.;T;0: @fileI"ext/pty/pty.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[ [I" check;TI"ext/pty/pty.c;T[I" getpty;T@V[I" open;T@V[I" spawn;T@V[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[@J@JcRDoc::TopLevel