eliminate children (#1741)

This commit is contained in:
David Markowitz 2025-01-25 18:47:51 -08:00 committed by GitHub
parent 566791e647
commit ae37641635
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,6 +43,13 @@
#include "CDZoneTableTable.h"
#include "eGameMasterLevel.h"
#ifdef DARKFLAME_PLATFORM_UNIX
#include <sys/types.h>
#include <sys/wait.h>
#endif
namespace Game {
Logger* logger = nullptr;
dServer* server = nullptr;
@ -455,6 +462,12 @@ int main(int argc, char** argv) {
}
}
#ifdef DARKFLAME_PLATFORM_UNIX
// kill off dead zombie instances
int status{};
waitpid(static_cast<pid_t>(-1), &status, WNOHANG);
#endif
t += std::chrono::milliseconds(masterFrameDelta);
std::this_thread::sleep_until(t);
}