Skip to content

fix(libc): preserve pending WASIX child waits - #141

Closed
theduke wants to merge 3 commits into
mainfrom
codex/napi-waitpid
Closed

theduke wants to merge 3 commits into
mainfrom
codex/napi-waitpid

Conversation

@theduke

@theduke theduke commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This was an optional guest-side correction for future sysroot builds. It changed waitpid(WNOHANG) to recognize the WASIX pending status before requiring a completed-child PID, and allowed POSIX waitpid(..., NULL, ...) for completed children.

It is closed because the Edge integration must run the released EdgeJS WASM unchanged. Wasmer #7046 instead returns the legacy-compatible Some(0) plus Nothing pending result from the host, so the released PID-first libc works without a guest rebuild. The test remains useful evidence but is not part of the rollout dependency chain.

Validation

  • Compiled the modified libc and test C sources with the WASIX 0.4.3 exnref toolchain using -Wall -Wextra -Werror.
  • Linked the test with this libc implementation and ran it 20 times through the standalone N-API/Wasmer CLI on public Wasmer f45c39b; all runs printed WAITPID_NONBLOCKING_OK and exited 0.
  • Linked the same test against the old sysroot libc; it failed at the pending poll with pid=-1 errno=12, confirming the regression detects the old behavior.
  • bash -n and git diff --check passed.

Fresh independent Astra reviews approved exact head e18b16a0bce82689f1b702be5a995e02ec6f9483; the post-fix review found no remaining blockers.

@theduke

theduke commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this as unnecessary for the Edge N-API integration. A libc change only affects newly rebuilt WASIX guests, while this work must support the released EdgeJS atom unchanged. The host-side proc_join compatibility path in Wasmer reports pending waits in the form understood by the released libc, so no guest or sysroot rebuild is required.

@theduke theduke closed this Sep 29, 2026
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