1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 22:42:48 +03:00
wezterm/wezterm-ssh
Wez Furlong fdb7c557e9 ssh: close stdout, stderr bridges if child is done and there is no data
Inspecting the wezterm process with `lsof -p`, before and after closing
a pane with `CloseCurrentPane`, the same number of unix domain sockets
are open, which is bad.

This commit tries a bit harder to clean things up: if we got a process
exit condition we now remember that we had it, and, while processing
the IO for that channel, if we have no data for stdout or stderr
(respectively) and the channel exited, we close our end of the
socketpair to encourage EOF to be detected on the other end.

This is sufficient to restore the number of open files to the same
number wezterm had opened prior to opening that pane.

@chipsenkbeil: this might possibly be a factor in the issue you
reported, but I haven't had time to really dig into that yet!

refs: https://github.com/wez/wezterm/issues/2466
refs: https://github.com/wez/wezterm/issues/2456
2022-08-30 08:00:49 -07:00
..
examples fixup build for pty api change 2022-08-12 08:45:02 -07:00
src ssh: close stdout, stderr bridges if child is done and there is no data 2022-08-30 08:00:49 -07:00
tests deps: remove pretty_env_loggger 2022-04-07 08:24:07 -07:00
Cargo.toml pty: try_clone_writer -> take_writer 2022-08-12 07:56:46 -07:00
LICENSE.md Add missing license files 2022-08-17 07:19:12 -07:00