Skip to content

Fix dup#801

Open
CvvT wants to merge 1 commit intomainfrom
weiteng/fix_dup
Open

Fix dup#801
CvvT wants to merge 1 commit intomainfrom
weiteng/fix_dup

Conversation

@CvvT
Copy link
Copy Markdown
Contributor

@CvvT CvvT commented Apr 23, 2026

Looks like dup and fcntl with F_DUPFD return different error codes when the specified fd is larger than the process file limit.

Also fix a race issue in dup where the specified fd needs to to be closed and then reused, which requires performing close and insert in an atomic manner. Otherwise, in between these two operations, the fd might be taken by another thread.

@github-actions
Copy link
Copy Markdown

🤖 SemverChecks 🤖 No breaking API changes detected

Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered.

@CvvT CvvT marked this pull request as ready for review April 23, 2026 00:41
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