Closed trungnt2910 closed 1 year ago
This pull request makes me wonder if it's possible to do the same for PID/TID emulation.
I wonder if it's possible to wrap all syscall/library calls that take a PID value and send it to a subsystem of blink, just like what this PR is doing with file descriptors. When this "PID emulation" subsystem is disabled, the wrappers become simple macros.
This feature would be really useful for platforms without fork like Emscripten.
Did this PR cause any build warning/failures? I've tested both on Cygwin and Linux and ensured that there are no build failures and/or warnings.
This PR contains the "VFS feature" as discussed in the Discord server.
As this feature is expensive in terms of syscalls and memory, it is disabled by default. Before this PR I've made a reasonable attempt to fix as many memory leaks as possible by running the tests with
MODE=asan
.I've also left some more details in the commit messages.