authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-12 15:34:26+01:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-12 15:34:26+01:00
log1d9b28403a1074cbbbd0605f07819136c9f96cdc
tree8e2955a8723a6db677f026a2c28eedd5e9ae75cd
parentbeae3cea178a0a93c25164e992e01c7b5b78e4d7

std: Correct check in signal test

Ooops.

1 files changed, 3 insertions(+), 2 deletions(-)

lib/std/os/test.zig+3-2
...@@ -656,14 +656,15 @@ test "sigaction" {...@@ -656,14 +656,15 @@ test "sigaction" {
656 const S = struct {656 const S = struct {
657 fn handler(sig: i32, info: *const os.siginfo_t, ctx_ptr: ?*const c_void) callconv(.C) void {657 fn handler(sig: i32, info: *const os.siginfo_t, ctx_ptr: ?*const c_void) callconv(.C) void {
658 // Check that we received the correct signal.658 // Check that we received the correct signal.
659 signal_test_failed = info.signo == os.SIGUSR1;659 if (sig == os.SIGUSR1 and sig == info.signo)
660 signal_test_failed = false;
660 }661 }
661 };662 };
662663
663 var sa = os.Sigaction{664 var sa = os.Sigaction{
664 .sigaction = S.handler,665 .sigaction = S.handler,
665 .mask = os.empty_sigset,666 .mask = os.empty_sigset,
666 .flags = os.SA_RESETHAND,667 .flags = os.SA_SIGINFO | os.SA_RESETHAND,
667 };668 };
668 var old_sa: os.Sigaction = undefined;669 var old_sa: os.Sigaction = undefined;
669 // Install the new signal handler.670 // Install the new signal handler.