mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
CRITICAL FIX: bun.SignalCode enum has hardcoded Linux signal values, which breaks on macOS where signals have different numbers: - Linux: SIGSTOP=19, SIGTERM=15, SIGKILL=9 - macOS: SIGSTOP=17, SIGTERM=15, SIGKILL=9 Changed from: - @intFromEnum(bun.SignalCode.SIGSTOP) // Always 19 To: - std.posix.SIG.STOP // 17 on macOS, 19 on Linux std.posix.SIG provides platform-specific signal constants that automatically use the correct values for each OS via the Zig standard library's platform detection. This ensures: 1. SIGSTOP actually freezes processes on macOS (not SIGTSTP which is catchable) 2. The two-pass freeze-then-kill strategy works correctly on all platforms 3. No platform-specific conditional code needed