Files
bun.sh/src/sys
Claude Bot 3a809203a3 fix: Use std.posix.SIG for truly portable signal constants
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
2025-10-06 16:47:32 +00:00
..
2025-09-27 00:45:29 -07:00