commit
cf60f9d1ac
1 changed files with 1 additions and 1 deletions
|
|
@ -341,7 +341,7 @@ when not defined(noSignalHandler):
|
||||||
|
|
||||||
registerSignalHandler() # call it in initialization section
|
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:
|
# ugly cast, but should work on all architectures:
|
||||||
type TSignalHandler = proc (sig: cint) {.noconv, benign.}
|
type TSignalHandler = proc (sig: cint) {.noconv, benign.}
|
||||||
c_signal(SIGINT, cast[TSignalHandler](hook))
|
c_signal(SIGINT, cast[TSignalHandler](hook))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue