diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-10-13 21:23:42 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-10-13 21:23:42 +0200 |
| commit | 9209e57bd965964b3853d8affecea571e6021b58 (patch) | |
| tree | 5ce7c260cd0b742675684266906de37e3972b8ae /src/main.c | |
| parent | 1e1ad7694b59dba4af4e70c978fdb1b2c7d17b5b (diff) | |
| download | box64-9209e57bd965964b3853d8affecea571e6021b58.tar.gz box64-9209e57bd965964b3853d8affecea571e6021b58.zip | |
Various changes on pthread cancel and tls destructor, should be easier to maintain
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c index 47cff957..a66e743b 100644 --- a/src/main.c +++ b/src/main.c @@ -1234,13 +1234,13 @@ void endBox64() if(!my_context || box64_quit) return; + // then call all the fini + box64_quit = 1; endMallocHook(); x64emu_t* emu = thread_get_emu(); // atexit first printf_log(LOG_DEBUG, "Calling atexit registered functions (exiting box64)\n"); CallAllCleanup(emu); - // then call all the fini - box64_quit = 1; printf_log(LOG_DEBUG, "Calling fini for all loaded elfs and unload native libs\n"); RunElfFini(my_context->elfs[0], emu); FreeLibrarian(&my_context->local_maplib, emu); // unload all libs @@ -1861,7 +1861,7 @@ int main(int argc, const char **argv, char **env) { // Get EAX int ret = GetEAX(emu); printf_log(LOG_DEBUG, "Emulation finished, EAX=%d\n", ret); - + endBox64(); #ifdef HAVE_TRACE if(trace_func) { box_free(trace_func); |