diff options
author | 2023-05-27 23:33:47 -0700 | |
---|---|---|
committer | 2023-05-27 23:33:47 -0700 | |
commit | 1388ec0d60e77cb0d71475fef33ab5764501b208 (patch) | |
tree | 738ff1c1382e4f3878db7826ece9b023095ce184 /src/crash_reporter.zig | |
parent | 4ba3ed512ac8407603c99d56d931038e0bdf0884 (diff) | |
download | bun-1388ec0d60e77cb0d71475fef33ab5764501b208.tar.gz bun-1388ec0d60e77cb0d71475fef33ab5764501b208.tar.zst bun-1388ec0d60e77cb0d71475fef33ab5764501b208.zip |
Fixes #2356 (#3098)
Diffstat (limited to 'src/crash_reporter.zig')
-rw-r--r-- | src/crash_reporter.zig | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/crash_reporter.zig b/src/crash_reporter.zig index e1ac54190..b583db248 100644 --- a/src/crash_reporter.zig +++ b/src/crash_reporter.zig @@ -44,17 +44,7 @@ pub fn reloadHandlers() !void { try setup_sigactions(&act); - var pipe = os.Sigaction{ - .handler = .{ .sigaction = sigpipe_handler }, - .mask = os.empty_sigset, - .flags = (os.SA.SIGINFO | os.SA.RESTART | os.SA.RESETHAND), - }; - - try os.sigaction( - os.SIG.PIPE, - &pipe, - null, - ); + bun_ignore_sigpipe(); } const os = std.os; pub fn start() !void { @@ -65,17 +55,7 @@ pub fn start() !void { }; try setup_sigactions(&act); - { - var pipe = os.Sigaction{ - .handler = .{ .sigaction = sigpipe_handler }, - .mask = os.empty_sigset, - .flags = (os.SA.SIGINFO | os.SA.RESTART | os.SA.RESETHAND), - }; - - try os.sigaction( - os.SIG.PIPE, - &pipe, - null, - ); - } + bun_ignore_sigpipe(); } + +extern fn bun_ignore_sigpipe() void; |