Fix/windows cli - #6
Merged
Merged
Conversation
- HostTermios: implement EnableRawMode/DisableRawMode for Windows via GetConsoleMode/SetConsoleMode (disable echo, line, processed input) - ContainerRuntimeService: branch stdin stream (SafeFileHandle on Unix, Console.OpenStandardInput on Windows) - ContainerRuntimeService: set TreatControlCAsInput=true on Windows to forward Ctrl+C as raw 0x03 to guest - ContainerRuntimeService: lift raw mode OS guards to cover all non-Browser platforms
- ContainerRuntimeService: change stdinStream type from FileStream to Stream for Windows Console.OpenStandardInput() compatibility - Fiberish.X86: switch Linux compiler from clang to gcc/g++ to avoid libc++ dependency (Arch Linux defaults to libstdc++)
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 pull request introduces significant improvements to Windows host-mapped file resizing and memory mapping alignment, along with a few other targeted fixes. The core changes add robust support for suspending and restoring host-mapped file views during file truncation and resizing on Windows, ensuring data consistency and correct memory mapping behavior. Additionally, the memory mapping logic is updated to respect the Windows allocation granularity, which is critical for correctness and performance.
The most important changes are:
Windows Host-Mapped File Resize Support:
WindowsHostMappedResizeScopeandAddressSpaceResizeScopetypes inProcessAddressSpaceSync.csto track and restore host-mapped file views during file resizing operations on Windows. Added logic to suspend and restore these mappings as needed. [1] [2]WindowsHostMappedResizePlantype and implementedSuspendHostMappedFileViewsForResizeandRestoreHostMappedFileViewsAfterResizemethods inVMAManager.csto manage the suspension and restoration of host-mapped file views, including invalidation and teardown of native mappings. [1] [2]Windows Memory Mapping Alignment Improvements:
WindowedMappedFilePageBackend.csto align memory mappings to the Windows allocation granularity using system calls, ensuring correct mapping offsets and lengths. This includes new helpers for retrieving system info and alignment values, and refactoring mapping logic to use these values. [1] [2] [3] [4]Bug Fixes and Minor Improvements:
WindowedMappedFilePageBackend.cs, replacingRawPtrwithPtrto ensure correct flush addresses. [1] [2]Other:
HostSocketInodeand refactoredConnectAsyncto use a new async connect start helper, improving socket connection handling. [1] [2]