Merge pull request #2000 from Varriount/fix-1546

Fix #1546
This commit is contained in:
reactormonk
2015-01-23 05:21:50 +05:00

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))