Skip to content

Commit

Permalink
fix: define SIGTERM on windows, since it is not exported by system/an…
Browse files Browse the repository at this point in the history
…si_c there

Signed-off-by: Christopher Arndt <[email protected]>
  • Loading branch information
SpotlightKid committed Jan 22, 2025
1 parent 3b40310 commit 2c99d18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/signal.nim
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import system/ansi_c

export SIG_DFL, SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM
export SIG_DFL, SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV

when not defined(windows):
export SIGPIPE
export SIGPIPE, SIGTERM
var
SIG_IGN* {.importc: "SIG_IGN", header: "<signal.h>".}: cint
SIGHUP* {.importc: "SIGHUP", header: "<signal.h>".}: cint
SIGQUIT* {.importc: "SIGQUIT", header: "<signal.h>".}: cint
else:
const SIGTERM* = cint(15)

type CSighandlerT = proc (a: cint) {.noconv.}

Expand Down

0 comments on commit 2c99d18

Please sign in to comment.