Exit nodejs with programResult (#6822)
This commit is contained in:
parent
439b72b402
commit
95629acd4d
1 changed files with 5 additions and 1 deletions
|
|
@ -1439,6 +1439,10 @@ const
|
||||||
## is the value that should be passed to `quit <#quit>`_ to indicate
|
## is the value that should be passed to `quit <#quit>`_ to indicate
|
||||||
## failure.
|
## failure.
|
||||||
|
|
||||||
|
when defined(nodejs):
|
||||||
|
var programResult* {.importc: "process.exitCode".}: int
|
||||||
|
programResult = 0
|
||||||
|
else:
|
||||||
var programResult* {.exportc: "nim_program_result".}: int
|
var programResult* {.exportc: "nim_program_result".}: int
|
||||||
## modify this variable to specify the exit code of the program
|
## modify this variable to specify the exit code of the program
|
||||||
## under normal circumstances. When the program is terminated
|
## under normal circumstances. When the program is terminated
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue