1
1
mirror of https://github.com/wez/wezterm.git synced 2025-01-05 12:15:23 +03:00

windows: remove gross wsl spawning workaround

This doesn't appear to be needed anymore (perhaps is windows build
dependent?) and removing it is the nicer, cleaner thing to do.
This commit is contained in:
Wez Furlong 2020-01-25 10:19:31 -08:00
parent 9558fbe6a4
commit 1a50075ae6

View File

@ -431,16 +431,6 @@ impl Reconnectable {
}
drop(child);
drop(pair.slave);
// Gross bug workaround: ClosePsuedoConsole can get confused about the
// processes attached to the console when using wsl; the scenario
// is that we use wsl.exe to invoke wezterm, daemonize it (which forks
// and detaches from the pty) and then we can discard the pty.
// The ClosePsuedoConsole call should not need to wait for any clients,
// but blocks forever.
// The workaround is to leak the console handle. The associated conhost
// process will show up in the process tree until this instance of
// wezterm is terminated, but it otherwise invisible.
std::mem::forget(pair.master);
unix_connect_with_retry(&sock_path)
.with_context(|| format!("failed to connect to {}", sock_path.display()))?