Skip to content

Conversation

@anonymou0719
Copy link

Summary

This PR ports a Unix process spawning fix from InstantWebP2P/libuvpp into liigo/libuv-vc6.

It addresses an issue in Unix process spawning logic in src/unix/process.c that could cause incorrect behavior in specific spawn scenarios (e.g. stdio inheritance, environment handling, exit status reporting, signal handling, or edge-case argument handling). The change also updates test/test-spawn.c to ensure the corrected behavior is covered by regression tests.

commit

Why it fits this repo’s guidelines/policies

  • Bug fix + regression coverage: Implementation change is paired with a matching test update in the same PR.
  • Scoped and review-friendly: Limited to Unix process spawning code and test-spawn; no unrelated refactors.
  • Stability and compatibility: Process spawning is core runtime behavior; this change improves correctness in edge cases while keeping risk controlled through tests.

Notes (if any adaptations): Ported cleanly from InstantWebP2P/libuvpp with no intended functional changes beyond applying the fix and associated tests.

Why it’s useful here

  • Benefit: Bug fix / reliability improvement for Unix process spawning behavior.
  • Impact: More predictable spawn behavior in edge cases and reduced risk of regressions due to strengthened test-spawn coverage.

Testing

  • Existing tests: Not run locally.
  • CI link (if any): N/A
  • Extra tests (if any): Not run; the patch updates test/test-spawn.c so CI/maintainers can validate using the refreshed regression coverage.

liigo and others added 4 commits July 12, 2014 11:25
support compile on Windows XP.
by Liigo.
Unix allows socket options to be set prior to binding. This
commit aligns Windows with this behavior.

Refs: joyent#1205
Refs: joyent#1270
Fixes: libuv/libuv#1842
PR-URL: libuv/libuv#1861
Reviewed-By: Bert Belder <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
win: allow setting udp socket options before bind
Signal dispositions are inherited by child processes.  Libuv itself
does not touch them (if you don't use uv_signal_start(), that is)
but the embedder might and probably does in the case of SIGPIPE.

Reset the disposition for signals 1-31 to their defaults right before
execve'ing into the new process.

Fixes: nodejs/node#13662
PR-URL: libuv/libuv#1376
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
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.

4 participants