mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
FairMQ: Fix session name modification shm transport.
This commit is contained in:
parent
0dc4000187
commit
b967de4a57
|
@ -62,7 +62,7 @@ FairMQTransportFactorySHM::FairMQTransportFactorySHM(const string& id, const Fai
|
|||
{
|
||||
numIoThreads = config->GetValue<int>("io-threads");
|
||||
fSessionName = config->GetValue<string>("session");
|
||||
fSessionName.resize(8); // shorten the session name, to acomodate for name size limit on some systems (MacOS)
|
||||
fSessionName.resize(8, '_'); // shorten the session name, to accommodate for name size limit on some systems (MacOS)
|
||||
// fSegmentName = "fmq_shm_" + fSessionName + "_main";
|
||||
segmentSize = config->GetValue<size_t>("shm-segment-size");
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ FairMQTransportFactorySHM::FairMQTransportFactorySHM(const string& id, const Fai
|
|||
}
|
||||
|
||||
fManager = fair::mq::tools::make_unique<Manager>(fSessionName, segmentSize);
|
||||
LOG(DEBUG) << "shmem: created/opened shared memory segment of " << segmentSize << " bytes. Available are " << fManager->Segment().get_free_memory() << " bytes.";
|
||||
LOG(DEBUG) << "shmem: created/opened shared memory segment '" << "fmq_shm_" << fSessionName << "_main" << "' of " << segmentSize << " bytes. Available are " << fManager->Segment().get_free_memory() << " bytes.";
|
||||
|
||||
{
|
||||
bipc::scoped_lock<bipc::named_mutex> lock(*fShMutex);
|
||||
|
|
|
@ -45,6 +45,8 @@ int main(int argc, char** argv)
|
|||
|
||||
notify(vm);
|
||||
|
||||
sessionName.resize(8, '_'); // shorten the session name, to accommodate for name size limit on some systems (MacOS)
|
||||
|
||||
if (cleanup)
|
||||
{
|
||||
cout << "Cleaning up \"" << sessionName << "\"..." << endl;
|
||||
|
|
Loading…
Reference in New Issue
Block a user