summaryrefslogtreecommitdiff
path: root/docs/static
diff options
context:
space:
mode:
authorJohn Smith <jsmith@jsmith.cz>2024-08-29 10:29:35 +0200
committerDamien George <damien@micropython.org>2025-11-04 16:47:19 +1100
commit1e5da2642cbb0b4c808323173b7a703c3a3cf24f (patch)
tree4cfc767e94bb2ba2e5570e6effaeea2fc84539fd /docs/static
parent4f2f520dc282f3b666e29aa7f316932cc9af8016 (diff)
shared/runtime: Set exit code according to the SystemExit exception.
Add abort setup code `nlr_set_abort` to the standard runtime executor. This makes the standard runtime respond to abort signal without any further modifications. - When aborted, the program exits with 137 exit code (configurable, same as posix sig abort), to differentiate from a normal shutdown. - When exited by exception/crash, the program will exit with exit code 1 (configurable). - When exited by exception KeyboardInterrupt, the program will exit with exit code 130 (configurable, same as posix sig int). - When exited with a exit code (from Python environment), this code is propagated. When a different object is passed, exit code is set to 1 and the value printed, to be consistent with Python docs: https://python.readthedocs.io/en/latest/library/exceptions.html#SystemExit Signed-off-by: John Smith <jsmith@jsmith.cz>
Diffstat (limited to 'docs/static')
0 files changed, 0 insertions, 0 deletions