Create sockets with WSA_FLAG_NO_HANDLE_INHERIT on Windows - #36938
Merged
Claude / Claude Code Review
completed
Aug 5, 2026 in 12m 55s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | test/js/node/child_process/child-process-socket-inherit.test.ts:41-62 |
Detached grandchild leaks if assertions before try/finally fail |
Annotations
Check warning on line 62 in test/js/node/child_process/child-process-socket-inherit.test.ts
claude / Claude Code Review
Detached grandchild leaks if assertions before try/finally fail
The `expect(stderr)`, `expect(exitCode)`, and `JSON.parse` calls at lines 42-44 run *before* the `try/finally` that kills the detached grandchild, so if the parent emits any stderr, exits non-zero, or prints malformed stdout after spawning, the assertion throws and the detached child is orphaned on the persistent Windows runner for 100s. Consider parsing `childPid` best-effort first and wrapping all assertions inside the `try`, and/or shortening the grandchild's `setTimeout(() => {}, 100000)` to
Loading