This commit is contained in:
Varriount
2015-01-22 18:46:00 -05:00
parent 4bcd96e20c
commit 478da0194b

View File

@@ -341,7 +341,7 @@ when not defined(noSignalHandler):
registerSignalHandler() # call it in initialization section
proc setControlCHook(hook: proc () {.noconv.}) =
proc setControlCHook(hook: proc () {.noconv.} not nil) =
# ugly cast, but should work on all architectures:
type TSignalHandler = proc (sig: cint) {.noconv, benign.}
c_signal(SIGINT, cast[TSignalHandler](hook))