Skip to content

Commit ac8460e

Browse files
committed
fun with raises
1 parent b6eb4d7 commit ac8460e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/system/excpt.nim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,8 @@ when not defined(noSignalHandler) and not defined(useNimRtl):
679679

680680
when defined(posix):
681681
# reset the signal handler to OS default
682-
c_signal(sign, SIG_DFL)
682+
{.cast(raises: []).}: # Work around -d:laxEffects bugs
683+
discard c_signal(sign, SIG_DFL)
683684

684685
# re-raise the signal, which will arrive once this handler exit.
685686
# this lets the OS perform actions like core dumping and will
@@ -716,4 +717,5 @@ proc setControlCHook(hook: proc () {.noconv.}) =
716717
when not defined(noSignalHandler) and not defined(useNimRtl):
717718
proc unsetControlCHook() =
718719
# proc to unset a hook set by setControlCHook
719-
c_signal(SIGINT, signalHandler)
720+
{.gcsafe.}: # Work around -d:laxEffects bugs
721+
discard c_signal(SIGINT, signalHandler)

0 commit comments

Comments
 (0)