Commit da9b3d62 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Prevent CGroup object deletion from crashing the application

In certain cases, a race condition seems to come up where the PID
retrieval thread tries to set the PIDs while the cgroup object is being
deleted. So lock the mutex in the destructor, so that if that should
happen, destruction will block while the PIDs are being updated.
parent eb68b6bb
......@@ -90,6 +90,7 @@ CGroup::CGroup(const QString &id)
CGroup::~CGroup()
{
std::lock_guard<std::mutex>{d->pidsLock};
}
QString KSysGuard::CGroup::id() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment