exe/voltos in voltos-0.3.0.rc7 vs exe/voltos in voltos-0.3.0.rc8
- old
+ new
@@ -6,17 +6,23 @@
Thread.new do
loop { STDOUT.print stdout.getc }
end
Thread.new do
loop do
- input = Readline.readline("", true).strip
- stdin.puts input
+ input = Readline.readline("", true)
+ if input.nil?
+ stdout.close
+ stdin.close
+ end
+ stdin.puts input.strip
end
end
begin
Process::waitpid(pid) rescue nil
rescue SystemExit, Interrupt
Process.kill('INT', pid)
retry
+ rescue EOFError
+ puts "Ctrl-D"
end
end
exit(status.to_i)