micropython/shared
John Smith 1e5da2642c 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>
2025-11-04 16:47:19 +11:00
..
libc all: Rename the "NORETURN" macro to "MP_NORETURN". 2025-05-13 10:36:47 +10:00
memzip ports: Remove unneeded future imports. 2025-09-15 14:54:09 +10:00
netutils shared/netutils: Cast the ticks value before printing. 2025-07-25 11:00:08 +10:00
readline all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
runtime shared/runtime: Set exit code according to the SystemExit exception. 2025-11-04 16:47:19 +11:00
timeutils shared/timeutils: Standardize supported date range on all platforms. 2025-07-09 11:54:21 +10:00
tinyusb all: Use "static inline" consistently in function definitions. 2025-10-02 16:30:52 +10:00
README.md lib,shared: Update README's based on contents of these dirs. 2021-07-13 00:17:02 +10:00

This directory contains libraries, utilities and helper code developed specifically for this project. The code is intended to be portable and usable by any port.