@@ -616,14 +616,14 @@ fn spawnPosixChildHelper(arg: usize) callconv(.c) u8 {
616
616
if (native_os == .linux and child_arg .sigmask != null ) {
617
617
std .debug .assert (linux .SIG .DFL == null );
618
618
for (1.. linux .NSIG ) | sig | {
619
- var old_act : posix .Sigaction = undefined ;
619
+ var old_act : linux .Sigaction = undefined ;
620
620
const new_act = mem .zeroes (posix .Sigaction );
621
621
_ = linux .sigaction (@intCast (sig ), & new_act , & old_act );
622
622
if (old_act .handler .handler == linux .SIG .IGN ) {
623
623
_ = linux .sigaction (@intCast (sig ), & old_act , null );
624
624
}
625
625
}
626
- posix . sigprocmask (posix .SIG .SETMASK , child_arg .sigmask , null );
626
+ std . debug . assert ( linux . sigprocmask (linux .SIG .SETMASK , child_arg .sigmask , null ) == 0 );
627
627
}
628
628
629
629
const err = switch (child_arg .self .expand_arg0 ) {
@@ -789,8 +789,8 @@ fn spawnPosix(self: *ChildProcess) SpawnError!void {
789
789
// We need to block signals here because we share VM with child before exec.
790
790
// Signal handlers may mess up our memory.
791
791
var old_mask : posix.sigset_t = undefined ;
792
- posix . sigprocmask (posix .SIG .SETMASK , & linux .all_mask , & old_mask );
793
- defer posix . sigprocmask (posix .SIG .SETMASK , & old_mask , null );
792
+ std . debug . assert ( linux . sigprocmask (linux .SIG .SETMASK , & linux .all_mask , & old_mask ) == 0 );
793
+ defer std . debug . assert ( linux . sigprocmask (linux .SIG .SETMASK , & old_mask , null ) == 0 );
794
794
child_arg .sigmask = & old_mask ;
795
795
rc = linux .clone (spawnPosixChildHelper , @intFromPtr (stack .ptr ) + stack_size , linux .CLONE .VM | linux .CLONE .VFORK | linux .SIG .CHLD , @intFromPtr (& child_arg ), null , 0 , null );
796
796
switch (linux .E .init (rc )) {
0 commit comments