diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-01-27 20:13:01 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-01-27 20:13:01 +0100 |
| commit | cdffe2388ea2dbafd4c82e304fc228eaefe4ac94 (patch) | |
| tree | 69fc95c4237ed2f8d908b8426594d7605cc14250 | |
| parent | 6c0af2dbb9ac6754411ad7792b307e4fa77fdc1e (diff) | |
| download | box64-cdffe2388ea2dbafd4c82e304fc228eaefe4ac94.tar.gz box64-cdffe2388ea2dbafd4c82e304fc228eaefe4ac94.zip | |
Rollback vfork changes, it broke SlayTheSpire, and probably other too (for #1221)
| -rw-r--r-- | src/emu/x64int3.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c index 10bd1c95..c287d18d 100644 --- a/src/emu/x64int3.c +++ b/src/emu/x64int3.c @@ -48,8 +48,8 @@ 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 if(forktype==3) - v = vfork(); + } /*else if(forktype==3) + v = vfork();*/ else v = fork(); /*if(type == EMUTYPE_MAIN) @@ -61,7 +61,10 @@ 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); // execute atforks child functions |