terminal/src/cascadia/TerminalConnection
Dustin L. Howett 31d78dceb5
Ignore closeOnExit when a conn. moves from Connecting to Failed (#10263)
ConptyConnection has two different failure modes:

1. We failed to initialize the pseudoconsole or create the process
2. The process exited with an error code.

Until this commit, they were treated the same way: closeOnExit=always
would force the pane/tab to be destroyed. This was very bad in case 1,
where we would display a (possibly useful) error message and then
immediately close the window.

This was made even worse by the change in #10045. We removed
startingDirectory validation and promoted it to an error message (so
that we could eventually let the connection handle startingDirectory in
its own way.) This of course revealed that a number of users had set
invalid starting directories… and those users included some who set
closeOnExit to always. Boom: instant "terminal opens and crashes"¹

In this commit, we introduce detection for a connection that fails
before it's been established. When that happens, we will ignore the
user's closeOnExit mode.

¹ It only looks like a crash; it's actually _technically_ functioning
properly.

Closes #10225.
2021-05-28 14:22:43 -05:00
..
Resources/en-US Disable path validation, add warning (#10045) 2021-05-12 17:36:11 +00:00
AzureClient.h Rework error handling and state flow in the Azure connection (#5356) 2020-04-16 17:32:52 -07:00
AzureClientID.h Apply audit mode to TerminalConnection/Core/Settings and WinCon… (#4016) 2020-01-03 10:44:27 -08:00
AzureConnection.cpp Add names to threads to make debugging a slight bit easier (#9801) 2021-04-14 10:56:52 +00:00
AzureConnection.h Azure: fall back to powershell when no preferred shell is set (#8197) 2020-11-09 14:55:45 -08:00
AzureConnection.idl Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
ConnectionStateHolder.h Apply audit mode to TerminalConnection/Core/Settings and WinCon… (#4016) 2020-01-03 10:44:27 -08:00
ConptyConnection.cpp Ignore closeOnExit when a conn. moves from Connecting to Failed (#10263) 2021-05-28 14:22:43 -05:00
ConptyConnection.h [Defapp] Use real HPCON for PTY management; Have Monarch always listen for connections (#10170) 2021-05-24 21:56:46 +00:00
ConptyConnection.idl Implement Default Terminal (#7489) 2021-03-26 17:09:49 -05:00
CTerminalHandoff.cpp [Defapp] Use real HPCON for PTY management; Have Monarch always listen for connections (#10170) 2021-05-24 21:56:46 +00:00
CTerminalHandoff.h [Defapp] Use real HPCON for PTY management; Have Monarch always listen for connections (#10170) 2021-05-24 21:56:46 +00:00
EchoConnection.cpp From orbit, nuke the Telnet connection and all supporting infra. (#7840) 2020-10-09 18:59:58 +00:00
EchoConnection.h Apply audit mode to TerminalConnection/Core/Settings and WinCon… (#4016) 2020-01-03 10:44:27 -08:00
EchoConnection.idl Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
init.cpp Hook up the WIL fallback error tracer in Terminal (#7864) 2020-10-09 22:20:12 +00:00
ITerminalConnection.idl Implement Default Terminal (#7489) 2021-03-26 17:09:49 -05:00
packages.config Update C++/WinRT to 2.0.210309.3 (#9437) 2021-03-10 16:04:59 -06:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
TerminalConnection.def Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
TerminalConnection.vcxproj Implement PGO in pipelines for AMD64 architecture; supply training test scenarios (#10071) 2021-05-13 21:12:30 +00:00
TerminalConnection.vcxproj.filters Implement Default Terminal (#7489) 2021-03-26 17:09:49 -05:00