General improvements in preparation for #16598#16601
Merged
Conversation
lhecker
commented
Jan 25, 2024
2df1ae8 to
5270766
Compare
DHowett
approved these changes
Jan 25, 2024
| } | ||
|
|
||
| _finalizeSessionPersistence(); | ||
| TerminateProcess(GetCurrentProcess(), 0); |
Member
Author
There was a problem hiding this comment.
Yep, this is just a reminder for me for when I resolve the merge conflicts.
| // This is just like StringFromGUID2 but with lowercase hexadecimal. | ||
| wchar_t buffer[39]; | ||
| swprintf_s(&buffer[0], 39, L"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); | ||
| return { &buffer[offset], length }; |
| return wil::str_printf<std::wstring>(L"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); | ||
| // This is just like StringFromGUID2 but with lowercase hexadecimal. | ||
| wchar_t buffer[39]; | ||
| swprintf_s(&buffer[0], 39, L"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); |
Member
There was a problem hiding this comment.
if we use fmt with FMT_COMPILE does that get smaller? better? worse?
zadjii-msft
approved these changes
Feb 6, 2024
Member
zadjii-msft
left a comment
There was a problem hiding this comment.
okay so you can't hand-edit state.json and have it hot-reload anymore, but that seems totally reasonable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This contains all the parts of #16598 that aren't specific to session
restore, but are required for the code in #16598:
{}brackets.SessionIdto theITerminalConnectioninterface.ApplicationStatebefore we terminate the process.state.jsonfor changes is important as it preventsdisturbing the session state while session persistence is ongoing.
That's because when
ApplicationStateflushes to disk, the FSmonitor will be triggered and reload the
ApplicationStateagain.