Fix #1546
This commit is contained in:
parent
4bcd96e20c
commit
478da0194b
1 changed files with 1 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue