Skip to content

Comments

fix(kqueue): fix syscall error propagation in completion handling#207

Open
jbuckmccready wants to merge 1 commit intomitchellh:mainfrom
jbuckmccready:fix-kqueue-syscall-error-propagation
Open

fix(kqueue): fix syscall error propagation in completion handling#207
jbuckmccready wants to merge 1 commit intomitchellh:mainfrom
jbuckmccready:fix-kqueue-syscall-error-propagation

Conversation

@jbuckmccready
Copy link

@jbuckmccready jbuckmccready commented Feb 3, 2026

Summary

There was bug in how error values were propagated in kqueue backend, detected by seeing PERM error (1) on shutdown when PERM is not documented to return from posix shutdown.

Changes

Extract errno_to_result helper to consistently convert posix errno values to the negative i32 format expected by syscall_result, replacing ad-hoc inline conversions. Fix shutdown operation to properly convert errno on failure instead of passing raw syscall result, and add NOTCONN error handling for shutdown completions.

Extract errno_to_result helper to consistently convert posix errno values
to the negative i32 format expected by syscall_result, replacing ad-hoc
inline conversions. Fix shutdown operation to properly convert errno on
failure instead of passing raw syscall result, and add NOTCONN error
handling for shutdown completions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant