Maybe instead of QSharedMemory you could use
boost::interprocess::named_mutex?
e.g.
#include <boost/interprocess/sync/named_mutex.hpp>
namespace bip = boost::interprocess;
:
:
bip::named_mutex dssMutex{ bip::open_or_create,
"MyApp.Named.Mutex.Name" };
bip::scoped_lock<bip::named_mutex> lk(dssMutex, bip::defer_lock);
const bool firstInstance{ lk.try_lock() };
printf(" firstInstance: %s", firstInstance ? "true" : "false");
in your main()?
-----Original Message-----
From: Interest <[email protected]> On Behalf Of Alexander
Dyagilev
Sent: 01 July 2023 11:04
To: [email protected]
Subject: [Interest] QSharedMemory::create returns out of resources errors on
a few macOS machines
Hello,
Some rare uses keeps reporting that our app can't start due to this error.
We use QSharedMemory to keep track of running instances of our app.
_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest