22 std::string cachePath = ArmarXDataPath::GetCachePath();
23 if (cachePath.empty())
28 cachePath.append(
"/pids/");
31 if (!std::filesystem::exists(dir) && !std::filesystem::create_directories(dir))
33 ARMARX_WARNING_S <<
"Unable to create Cache directory for the ScenarioManager plugin at " << cachePath;
38 + app->getPackageName() +
"."
39 + app->getScenario()->getName() +
"."
40 + app->getName() + (app->getInstanceName().empty() ?
"" :
".")
41 + app->getInstanceName() +
".pids";
43 if (!std::filesystem::exists(
filename))
58 std::string cachePath = ArmarXDataPath::GetCachePath();
59 cachePath.append(
"/pids/");
62 if (!std::filesystem::exists(dir) && !std::filesystem::create_directories(dir))
64 ARMARX_WARNING_S <<
"Unable to create Cache directory for the ScenarioManager plugin at " << cachePath;
68 + app->getPackageName() +
"."
69 + app->getScenario()->getName() +
"."
70 + app->getName() + (app->getInstanceName().empty() ?
"" :
".")
71 + app->getInstanceName() +
".pids";
73 if (app->getPid() == -1)
75 std::filesystem::remove(std::filesystem::path(
filename));
81 output << app->getPid();
88 std::string cachePath = ArmarXDataPath::GetCachePath();
89 cachePath.append(
"/pids/");
91 std::filesystem::remove_all(std::filesystem::path(cachePath));