Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 45fb3f25 authored by Carla Guillen's avatar Carla Guillen
Browse files

bigfix: adding pclose!

parent b9df90b9
......@@ -59,9 +59,10 @@ GpfsmonSensorGroup::~GpfsmonSensorGroup() {
void GpfsmonSensorGroup::read() {
ureading_t reading;
reading.timestamp = getTimestamp();
FILE * pf = nullptr;
try {
std::string toparse;
FILE * pf = popen(_cmd_io.c_str(), "r");
pf = popen(_cmd_io.c_str(), "r");
if (pf != nullptr) {
char buf[BUFFER_SIZE];
while (fgets(buf, BUFFER_SIZE, pf) != nullptr) {
......@@ -80,12 +81,17 @@ void GpfsmonSensorGroup::read() {
createTempFile();
}
}
pclose(pf);
pf = nullptr;
} else {
LOG(error) << "Sensorgroup " << _groupName << " popen failed: " << strerror(errno);
}
} catch (const std::exception &e) {
LOG(error) << "Sensorgroup " << _groupName << " could not read value: " << e.what();
}
if(pf != nullptr){
pclose(pf);
}
}
void GpfsmonSensorGroup::createTempFile() {
......
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