From 2c99d183bab5b96c3d630beef35ff83c8868a872 Mon Sep 17 00:00:00 2001 From: Christopher Arndt Date: Wed, 22 Jan 2025 23:13:01 +0100 Subject: [PATCH] fix: define SIGTERM on windows, since it is not exported by system/ansi_c there Signed-off-by: Christopher Arndt --- examples/signal.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/signal.nim b/examples/signal.nim index b08d10d..60771cc 100644 --- a/examples/signal.nim +++ b/examples/signal.nim @@ -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: "".}: cint SIGHUP* {.importc: "SIGHUP", header: "".}: cint SIGQUIT* {.importc: "SIGQUIT", header: "".}: cint +else: + const SIGTERM* = cint(15) type CSighandlerT = proc (a: cint) {.noconv.}