@@ -434,11 +434,11 @@ test "sigaltstack" {
434
434
if (native_os == .windows or native_os == .wasi ) return error .SkipZigTest ;
435
435
436
436
var st : os.stack_t = undefined ;
437
- try os .sigaltstack (null , & st );
437
+ try os .posix . sigaltstack (null , & st );
438
438
// Setting a stack size less than MINSIGSTKSZ returns ENOMEM
439
439
st .flags = 0 ;
440
440
st .size = 1 ;
441
- try testing .expectError (error .SizeTooSmall , os .sigaltstack (& st , null ));
441
+ try testing .expectError (error .SizeTooSmall , os .posix . sigaltstack (& st , null ));
442
442
}
443
443
444
444
// If the type is not available use void to avoid erroring out when `iter_fn` is
@@ -736,7 +736,7 @@ test "getrlimit and setrlimit" {
736
736
737
737
inline for (std .meta .fields (os .rlimit_resource )) | field | {
738
738
const resource = @intToEnum (os .rlimit_resource , field .value );
739
- const limit = try os .getrlimit (resource );
739
+ const limit = try os .posix . getrlimit (resource );
740
740
741
741
// On 32 bit MIPS musl includes a fix which changes limits greater than -1UL/2 to RLIM_INFINITY.
742
742
// See http://git.musl-libc.org/cgit/musl/commit/src/misc/getrlimit.c?id=8258014fd1e34e942a549c88c7e022a00445c352
@@ -745,10 +745,10 @@ test "getrlimit and setrlimit" {
745
745
// In that case the following the limit would be RLIM_INFINITY and the following setrlimit fails with EPERM.
746
746
if (comptime builtin .cpu .arch .isMIPS () and builtin .link_libc ) {
747
747
if (limit .cur != os .linux .RLIM .INFINITY ) {
748
- try os .setrlimit (resource , limit );
748
+ try os .posix . setrlimit (resource , limit );
749
749
}
750
750
} else {
751
- try os .setrlimit (resource , limit );
751
+ try os .posix . setrlimit (resource , limit );
752
752
}
753
753
}
754
754
}
@@ -807,10 +807,10 @@ test "sigaction" {
807
807
var old_sa : os.Sigaction = undefined ;
808
808
809
809
// Install the new signal handler.
810
- try os .sigaction (os .SIG .USR1 , & sa , null );
810
+ try os .posix . sigaction (os .SIG .USR1 , & sa , null );
811
811
812
812
// Check that we can read it back correctly.
813
- try os .sigaction (os .SIG .USR1 , null , & old_sa );
813
+ try os .posix . sigaction (os .SIG .USR1 , null , & old_sa );
814
814
try testing .expectEqual (& S .handler , old_sa .handler .sigaction .? );
815
815
try testing .expect ((old_sa .flags & os .SA .SIGINFO ) != 0 );
816
816
@@ -819,26 +819,26 @@ test "sigaction" {
819
819
try testing .expect (S .handler_called_count == 1 );
820
820
821
821
// Check if passing RESETHAND correctly reset the handler to SIG_DFL
822
- try os .sigaction (os .SIG .USR1 , null , & old_sa );
822
+ try os .posix . sigaction (os .SIG .USR1 , null , & old_sa );
823
823
try testing .expectEqual (os .SIG .DFL , old_sa .handler .handler );
824
824
825
825
// Reinstall the signal w/o RESETHAND and re-raise
826
826
sa .flags = os .SA .SIGINFO ;
827
- try os .sigaction (os .SIG .USR1 , & sa , null );
827
+ try os .posix . sigaction (os .SIG .USR1 , & sa , null );
828
828
try os .raise (os .SIG .USR1 );
829
829
try testing .expect (S .handler_called_count == 2 );
830
830
831
831
// Now set the signal to ignored
832
832
sa .handler = .{ .handler = os .SIG .IGN };
833
833
sa .flags = 0 ;
834
- try os .sigaction (os .SIG .USR1 , & sa , null );
834
+ try os .posix . sigaction (os .SIG .USR1 , & sa , null );
835
835
836
836
// Re-raise to ensure handler is actually ignored
837
837
try os .raise (os .SIG .USR1 );
838
838
try testing .expect (S .handler_called_count == 2 );
839
839
840
840
// Ensure that ignored state is returned when querying
841
- try os .sigaction (os .SIG .USR1 , null , & old_sa );
841
+ try os .posix . sigaction (os .SIG .USR1 , null , & old_sa );
842
842
try testing .expectEqual (os .SIG .IGN , old_sa .handler .handler .? );
843
843
}
844
844
0 commit comments