diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-01-19 15:09:20 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-01-19 15:09:20 +0100 |
| commit | e4c64073c5b433d8a59f1a456518a45037a414dc (patch) | |
| tree | 87a3f5509fdfaa76f91a26f8eb97a7c0144a4664 /src/emu | |
| parent | 0ff15e91d94e82fdb3d1a7de4529c58774550c07 (diff) | |
| download | box64-e4c64073c5b433d8a59f1a456518a45037a414dc.tar.gz box64-e4c64073c5b433d8a59f1a456518a45037a414dc.zip | |
Reworked exit, unloading libs and running Fini as it should (plus a workaround for nvidia driver not unloading)
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/x64int3.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c index c78cdd0a..10bd1c95 100644 --- a/src/emu/x64int3.c +++ b/src/emu/x64int3.c @@ -48,7 +48,9 @@ x64emu_t* x64emu_fork(x64emu_t* emu, int forktype) iFpppp_t forkpty = (iFpppp_t)emu->forkpty_info->f; v = forkpty(emu->forkpty_info->amaster, emu->forkpty_info->name, emu->forkpty_info->termp, emu->forkpty_info->winp); emu->forkpty_info = NULL; - } else + } else if(forktype==3) + v = vfork(); + else v = fork(); /*if(type == EMUTYPE_MAIN) thread_set_emu(emu);*/ @@ -59,10 +61,6 @@ x64emu_t* x64emu_fork(x64emu_t* emu, int forktype) for (int i=0; i<my_context->atfork_sz; --i) if(my_context->atforks[i].parent) EmuCall(emu, my_context->atforks[i].parent); - if(forktype==3) { - // vfork, the parent wait the end or execve of the son - waitpid(v, NULL, WEXITED); - } } else if(v==0) { ResetSegmentsCache(emu); |