mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
committed by
Andreas Rumpf
parent
d365f1a81a
commit
244bf68fb0
@@ -352,7 +352,7 @@ type
|
||||
sa_mask*: Sigset ## Set of signals to be blocked during execution of
|
||||
## the signal handling function.
|
||||
sa_flags*: cint ## Special flags.
|
||||
sa_sigaction*: proc (x: cint, y: var SigInfo, z: pointer) {.noconv.}
|
||||
sa_sigaction*: proc (x: cint, y: ptr SigInfo, z: pointer) {.noconv.}
|
||||
|
||||
Stack* {.importc: "stack_t",
|
||||
header: "<signal.h>", final, pure.} = object ## stack_t
|
||||
|
||||
@@ -72,7 +72,7 @@ else:
|
||||
var SEGV_MAPERR {.importc, header: "<signal.h>".}: cint
|
||||
|
||||
{.push stackTrace: off.}
|
||||
proc segfaultHandler(sig: cint, y: var SigInfo, z: pointer) {.noconv.} =
|
||||
proc segfaultHandler(sig: cint, y: ptr SigInfo, z: pointer) {.noconv.} =
|
||||
if y.si_code == SEGV_MAPERR:
|
||||
{.gcsafe.}:
|
||||
raise se
|
||||
|
||||
Reference in New Issue
Block a user