diff --git a/lib/yamatanooroti/vterm.rb b/lib/yamatanooroti/vterm.rb index 573759c..00ad7dc 100644 --- a/lib/yamatanooroti/vterm.rb +++ b/lib/yamatanooroti/vterm.rb @@ -76,7 +76,12 @@ def close private def vterm_write(chunk) @vterm.write(chunk) - @pty_input.write(@vterm.read) + response = @vterm.read + begin + @pty_input.write(response) + rescue Errno::EIO + # In case process terminates suddenly after writing "\e[6n" + end @result = nil end