Repository navigation
Conversation
Direct bsdsocket.library calls do not have to use libc's errno storage. In particular, classic newlib can share errno between the GUI task and a network worker. A libc call on the GUI task can then replace a socket EWOULDBLOCK before curl classifies it, turning a retry into a receive failure even though the native socket error is still EWOULDBLOCK. Read SOCKERRNO through Errno() and set it with SocketBaseTagList using SBTC_ERRNO. Keep both operations on the native socket error channel. Limit this to the classic direct-bsdsocket path; leave the other Amiga variants and libc networking paths unchanged.
vszakats
reviewed
Oct 30, 2026
Put the do block on a continuation line and indent its body to match the surrounding multiline macro style. Socket errors behave as before.
vszakats
reviewed
Oct 30, 2026
Copy the review suggestion exactly, including its continuation spacing.
Member
|
LGTM now! |
bagder
approved these changes
Nov 2, 2026
Member
|
Thanks, merged! |
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.
Classic AmigaOS builds using bsdsocket.library directly still read socket errors through libc
errno. Those are not necessarily the same error channel. With the October 29 AmigaPorts newlib SDK, libc errno is shared between the GUI task and its pthread worker: a main-task libc call can replace the worker'sEWOULDBLOCKbefore curl classifies a nonblocking receive.Use
Errno()forSOCKERRNOandSocketBaseTagList(SBTC_ERRNO)forSET_SOCKERRNO, keeping both operations on the native socket error channel. The setter evaluates its argument once. The guard excludes OS4, MorphOS, AROS and libc networking paths. This does not make libc errno thread-local or change application socket/AmiSSL task ownership.Validation:
curl-lint, and all 79unittesttests passed.cf-socket.candcurlx/wait.ccross-compiled with m68k GCC 16.2.1 and the validated classic-Amiga curl configuration.sread()returns EWOULDBLOCK, before curl readsSOCKERRNO; the main task assignserrno = ENOENT, then releases the worker. An idle live TCP connection is used, without sending an HTTP request.Both native probes completed with their expected outcomes and zero failures. The repaired integration also passed WebSocket echo while a TLS handshake remained pending. These are emulator/guest results, not physical-hardware validation; the native runtime run used 8.23.0 with the same native accessors (its setter was an inline helper), not today's complete master. The SDK-specific interleaving harness is outside curl's portable suite, so the test method and exact outcomes are included here.