Skip to content

Commit db9774c

Browse files
committed
Try to get the client name during DefTerm handoff (#19014)
(cherry picked from commit cf95460) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgbO1u8 Service-Version: 1.23
1 parent 38f28e8 commit db9774c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cascadia/TerminalConnection/ConptyConnection.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,13 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
313313
}
314314
CATCH_LOG()
315315

316+
try
317+
{
318+
auto processImageName{ wil::QueryFullProcessImageNameW<std::wstring>(_piClient.hProcess) };
319+
_clientName = std::filesystem::path{ std::move(processImageName) }.filename().wstring();
320+
}
321+
CATCH_LOG()
322+
316323
_pipe = std::move(pipe.server);
317324
*in = pipe.client.release();
318325
*out = pipeClientClone.release();

0 commit comments

Comments
 (0)