Skip to content

Commit

Permalink
Rescue and ignore EIO while writing response from vterm
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Sep 16, 2024
1 parent a2ec4bf commit cc5b578
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/yamatanooroti/vterm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cc5b578

Please sign in to comment.