Skip to content

Commit

Permalink
Add a note about commiting suicide
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Jan 6, 2021
1 parent 977db46 commit bcbef34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/cascadia/WindowsTerminal/AppHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,6 @@ void AppHost::_HandleCommandlineArgs()
// use to send the actions to the app.
peasant.ExecuteCommandlineRequested({ this, &AppHost::_DispatchCommandline });
}

// TODO:projects/5 if we end up not creating a new window, we crash. I'm
// thinking this is because the XAML host is not happy about being torn
// down before it has a chance to do really anything. Is there some way
// to get the app logic without instantiating the entire app? or at
// least the parts we'll need for remoting?
}

// Method Description:
Expand Down
5 changes: 4 additions & 1 deletion src/cascadia/WindowsTerminal/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
AppHost host;
if (!host.HasWindow())
{
// return 0;
// If we were told to not have a window, exit early. Make sure to use
// ExitProcess to commit sepuku here. If you try just `return 0`, then
// the XAML app host will crash during teardown. ExitProcess avoids
// that.
ExitProcess(0);
}

Expand Down

0 comments on commit bcbef34

Please sign in to comment.