Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add noQuit option #19419

Merged
merged 2 commits into from Jan 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/system.nim
Expand Up @@ -1198,8 +1198,8 @@ proc align(address, alignment: int): int =
else:
result = (address + (alignment - 1)) and not (alignment - 1)

when defined(nimdoc):
proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn.}
when defined(nimNoQuit):
proc quit*(errorcode: int = QuitSuccess) = discard "ignoring quit"
## Stops the program immediately with an exit code.
##
## Before stopping the program the "exit procedures" are called in the
Expand All @@ -1223,6 +1223,9 @@ when defined(nimdoc):
## It does *not* call the garbage collector to free all the memory,
## unless an `addExitProc` proc calls `GC_fullCollect <#GC_fullCollect>`_.

elif defined(nimdoc):
proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn.}

elif defined(genode):
include genode/env

Expand Down