Skip to content

Commit 4bd2fa2

Browse files
committed
qemu/main.c: Integrate atexit to be run while exiting.
Signed-off-by: Andrew Leech <andrew@alelec.net>
1 parent 763c1d7 commit 4bd2fa2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ports/qemu/main.c

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "py/runtime.h"
3131
#include "py/stackctrl.h"
3232
#include "py/gc.h"
33+
#include "py/modatexit.h"
3334
#include "py/mperrno.h"
3435
#include "shared/runtime/gchelper.h"
3536
#include "shared/runtime/pyexec.h"
@@ -60,6 +61,10 @@ int main(int argc, char **argv) {
6061
}
6162
}
6263

64+
#if MICROPY_PY_ATEXIT
65+
mp_atexit_execute();
66+
#endif
67+
6368
mp_printf(&mp_plat_print, "MPY: soft reboot\n");
6469

6570
gc_sweep_all();

0 commit comments

Comments
 (0)