Open EmosewaMC opened 6 months ago
Do you have a sample of the code you have in mind to be changed? I'm wondering if there's a C++ or POSIX API that might have more cross-platform compatibility.
There is no standard way of doing this. It will differ based on platform
Is your feature request related to a problem?
This would allow for more control over security, less work being done by master and better heartbeat controls for detecting if a server is alive or dead.
Describe the solution you'd like
Replace calls to system with fork/exec on *nix and CreateProcess on Windows.
Repository breaking implications
Could prevent servers from starting on platforms without those commands.
Describe alternatives you've considered
continuing to use system and being complacent
Additional context
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa https://man7.org/linux/man-pages/man2/fork.2.html https://man7.org/linux/man-pages/man3/exec.3.html https://linux.die.net/man/3/execv