File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ pub fn main() !void {
5454 };
5555
5656 // handle SIGABRT (called by lua in Debug mode)
57- const act : if (builtin.mode == .Debug ) std .posix .Sigaction else void = if (builtin .mode == .Debug ) .{
57+ const using_sigaction = builtin .mode == .Debug and builtin .os .tag != .windows ;
58+ const act : if (using_sigaction ) std .posix .Sigaction else void = if (using_sigaction ) .{
5859 .handler = .{
5960 .handler = struct {
6061 fn handleAbrt (_ : c_int ) callconv (.C ) noreturn {
@@ -70,7 +71,7 @@ pub fn main() !void {
7071 .mask = if (builtin .os .tag == .linux ) std .posix .empty_sigset else 0 ,
7172 .flags = 0 ,
7273 };
73- if (builtin . mode == .Debug ) try std .posix .sigaction (std .posix .SIG .ABRT , & act , null );
74+ if (using_sigaction ) try std .posix .sigaction (std .posix .SIG .ABRT , & act , null );
7475
7576 const l = try Lua .init (& allocator );
7677 defer l .close ();
You can’t perform that action at this time.
0 commit comments