Skip to content

Fix dup3 syscall to correctly handle flags and O_CLOEXEC#26724

Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:fix_dup3
Apr 20, 2026
Merged

Fix dup3 syscall to correctly handle flags and O_CLOEXEC#26724
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:fix_dup3

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Apr 17, 2026

  • Added O_CLOEXEC support to __syscall_dup3 in JS filesystem.
  • Fixed flag validation in __syscall_dup3 in both JS and WasmFS.
  • Added dup3 and O_CLOEXEC test cases to existing dup tests.

Fixes: #26703

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Apr 18, 2026

The test duplication here makes me a bit sad, but there is already larger problem of resolving the wasmfs-test-split that happened during the development of wasmfs, and fixing that is outside the scope of this PR.

- Added O_CLOEXEC support to __syscall_dup3 in JS filesystem.
- Fixed flag validation in __syscall_dup3 in both JS and WasmFS.
- Added dup3 and O_CLOEXEC test cases to existing dup tests.

Fixes: emscripten-core#26703
@sbc100 sbc100 merged commit 49c6f4a into emscripten-core:main Apr 20, 2026
29 checks passed
@sbc100 sbc100 deleted the fix_dup3 branch April 20, 2026 17:54
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.

dup3 silently accepts unknown flags

2 participants