std: Further siginfo refinements

* Define siginfo and sigaction for Darwin
* Define sigaction/handler union for maximum libc compatibility
* Minor correction to some type definitions
This commit is contained in:
LemonBoy
2020-12-12 16:44:10 +01:00
parent 1d9b28403a
commit 629cc6cf28
9 changed files with 91 additions and 41 deletions

View File

@@ -1721,7 +1721,7 @@ pub fn attachSegfaultHandler() void {
return;
}
var act = os.Sigaction{
.sigaction = handleSegfaultLinux,
.handler = .{ .sigaction = handleSegfaultLinux },
.mask = os.empty_sigset,
.flags = (os.SA_SIGINFO | os.SA_RESTART | os.SA_RESETHAND),
};
@@ -1740,7 +1740,7 @@ fn resetSegfaultHandler() void {
return;
}
var act = os.Sigaction{
.sigaction = os.SIG_DFL,
.handler = .{ .sigaction = os.SIG_DFL },
.mask = os.empty_sigset,
.flags = 0,
};