Skip to content

Commit 477a563

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

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ports/qemu/main.c

Lines changed: 5 additions & 0 deletions
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"
@@ -62,6 +63,10 @@ int main(int argc, char **argv) {
6263

6364
mp_printf(&mp_plat_print, "MPY: soft reboot\n");
6465

66+
#if MICROPY_PY_ATEXIT
67+
mp_atexit_execute();
68+
#endif
69+
6570
gc_sweep_all();
6671
mp_deinit();
6772
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy