Skip to content

spawn: don't forward SIGPWR on Linux

80b86f4
Select commit
Loading
Failed to load commit list.
Closed

spawn: don't forward SIGPWR on Linux #30983

spawn: don't forward SIGPWR on Linux
80b86f4
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed May 18, 2026 in 17m 3s

Code review found 1 potential issue

Found 5 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 0
🟣 Pre-existing 1
Severity File:Line Issue
🟣 Pre-existing src/jsc/bindings/c-bindings.cpp:939-941 SIGPOLL/SIGIO and SIGIOT/SIGABRT aliasing corrupts previous_actions[]

Annotations

Check notice on line 941 in src/jsc/bindings/c-bindings.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

SIGPOLL/SIGIO and SIGIOT/SIGABRT aliasing corrupts previous_actions[]

Pre-existing issue, but same bug class as the SIGPWR fix and in the macro being edited: `SIGIOT` is an alias for `SIGABRT` (everywhere) and `SIGPOLL` is an alias for `SIGIO` (Linux), so `FOR_EACH_SIGNAL` expands `REGISTER_SIGNAL` twice for the same signal number. The second `sigaction()` call overwrites `previous_actions[N]` with the just-installed forwarding handler, so `Bun__unregisterSignalsForForwarding` "restores" the SA_RESETHAND forwarder instead of the original — after every `spawnSync`,