ruby-changes:28130
From: nobu <ko1@a...>
Date: Mon, 8 Apr 2013 14:12:17 +0900 (JST)
Subject: [ruby-changes:28130] nobu:r40182 (trunk): test_curses.rb: add sentinel
nobu 2013-04-08 14:12:08 +0900 (Mon, 08 Apr 2013) New Revision: 40182 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40182 Log: test_curses.rb: add sentinel * test/test_curses.rb (TestCurses#run_curses): add sentinel to get rid of read pty output after the child process terminated, which causes EIO on Linux. Modified files: trunk/test/test_curses.rb Index: test/test_curses.rb =================================================================== --- test/test_curses.rb (revision 40181) +++ test/test_curses.rb (revision 40182) @@ -28,14 +28,16 @@ rescue Exception => e https://github.com/ruby/ruby/blob/trunk/test/test_curses.rb#L28 ensure close_screen puts "", [Marshal.dump([result, e])].pack('m').delete("\n") + print "\\0" end src if input w.print(input) w.flush end - res = r.read + res = r.gets("\0") return unless res + res.chomp!("\0") res, error = Marshal.load(res[/(.*)\Z/, 1].unpack('m')[0]) raise error if error return res -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/