update parser (#5)

This commit is contained in:
tompzf
2026-01-16 11:40:02 +01:00
committed by GitHub
parent 5039a37131
commit 234be8917f
115 changed files with 14038 additions and 5380 deletions

View File

@@ -125,7 +125,9 @@ namespace ipc
else
{
std::srand(static_cast<unsigned>(std::time(nullptr))); // Use current time as seed for random generator
m_ssName = std::string("NAMED_MUTEX_") + std::to_string(std::rand());
uint32_t uiRand = 0;
while (!uiRand) uiRand = std::rand();
m_ssName = std::string("NAMED_MUTEX_") + std::to_string(uiRand);
}
m_handle = CreateMutexA(nullptr, FALSE, (std::string("Global\\") + m_ssName).c_str());
}
@@ -191,7 +193,9 @@ namespace ipc
else
{
std::srand(static_cast<unsigned>(std::time(nullptr))); // Use current time as seed for random generator
m_ssName = std::string("NAMED_MUTEX_") + std::to_string(std::rand());
uint32_t uiRand = 0;
while (!uiRand) uiRand = std::rand();
m_ssName = std::string("NAMED_MUTEX_") + std::to_string(uiRand);
}
m_handle = sem_open(m_ssName.c_str(), O_CREAT, 0777 /*O_RDWR*/, 1);
}