Fix missing return after accept4 failure in InteropServer::Accept#40323
Open
benhillis wants to merge 1 commit intofeature/wsl-for-appsfrom
Open
Fix missing return after accept4 failure in InteropServer::Accept#40323benhillis wants to merge 1 commit intofeature/wsl-for-appsfrom
benhillis wants to merge 1 commit intofeature/wsl-for-appsfrom
Conversation
When accept4 fails, the function logged an error but continued to call setsockopt on an invalid file descriptor (-1) and returned the invalid fd to the caller. Add the missing early return to prevent operating on an invalid file descriptor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
66ef8d3 to
bb0c231
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores the missing early return {}; in InteropServer::Accept() on accept4() failure to avoid calling setsockopt() on an invalid fd and returning it to callers (aligning behavior with master).
Changes:
- Add an early
return {};whenaccept4()fails inInteropServer::Accept(). - (Unrelated) Add CloudTest/TAEF run outputs and system logs under
GeneralAttachment/.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/linux/init/util.cpp | Adds missing early return after accept4() failure in InteropServer::Accept(). |
| GeneralAttachment/TestResults/stdout.txt | Captured test stdout output (appears to be generated artifact). |
| GeneralAttachment/TestResults/stderr.txt | Captured test stderr output (appears to be generated artifact). |
| GeneralAttachment/TestResults/dmesg.txt | Captured kernel log output (appears to be generated artifact). |
| GeneralAttachment/TestResults/TestJobGroupFile/TestGroup.xml | CloudTest job group definition captured from a run. |
| GeneralAttachment/TestResults/TaefTestConsoleLogs/wsltests_6.psinfo | Process/environment snapshot from test execution. |
| GeneralAttachment/TestResults/ProcessDumpUrls.txt | Dump URL output captured from a run. |
| GeneralAttachment/TestResults/Get-MpPreference.txt | Defender preferences output captured from a run. |
| GeneralAttachment/TestResults/CloudTest-SetupLogs/CloudTest-Setup_1.psinfo | Setup script process/environment snapshot from a run. |
| GeneralAttachment/TestResults/CloudTest-SetupLogs/CloudTest-Setup_1.out | Setup script stdout from a run. |
| GeneralAttachment/SystemLogs/worker-service20260425.log | CloudTest worker service log captured from a run. |
| GeneralAttachment/SystemLogs/downloadReport.csv | Download report output captured from a run (includes signed URLs). |
| GeneralAttachment/SystemLogs/DiskPartitioning.stdout | Disk partitioning script stdout captured from a run. |
| GeneralAttachment/SystemLogs/DiskPartitioning.psinfo | Disk partitioning script process/environment snapshot from a run. |
| GeneralAttachment/SystemLogs/AntivirusPowershell.psinfo | Antivirus exclusion script process/environment snapshot from a run. |
| GeneralAttachment/ProcessDumpUrls.txt | Dump URL output (root copy) captured from a run. |
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.
When accept4 fails in InteropServer::Accept, the function logs an error but falls through to call setsockopt on the invalid file descriptor (-1) and returns it to the caller.
This
return {};exists on master (added in 040f5e4) but was lost during a merge into feature/wsl-for-apps.Fix: Add the missing early
return {};to match master behavior.