mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-02-02 01:47:06 +00:00
eliminate children (#1741)
This commit is contained in:
parent
566791e647
commit
ae37641635
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user