do not ignore the return value of system(cmd) anymore.

This commit is contained in:
2022-04-11 16:10:00 +02:00
parent 9cc1957b2d
commit 17a31dfcc4
6 changed files with 45 additions and 11 deletions

View File

@@ -893,7 +893,9 @@ int main(int argc, char *argv[])
std::ostringstream oss;
oss << path << "musrfit" << " " << strInfile.str() << " " << musrfitOptions;
std::cout << std::endl << ">> msr2data: **INFO** Calling " << oss.str() << std::endl;
system(oss.str().c_str());
if (system(oss.str().c_str()) == -1) {
std::cerr << "**ERROR** cmd: " << oss.str().c_str() << " failed." << std::endl;
}
}
}
@@ -982,7 +984,9 @@ int main(int argc, char *argv[])
std::ostringstream oss;
oss << path << "musrfit" << " " << strInfile.str() << " " << musrfitOptions;
std::cout << std::endl << ">> msr2data: **INFO** Calling " << oss.str() << std::endl;
system(oss.str().c_str());
if (system(oss.str().c_str()) == -1) {
std::cerr << "**ERROR** cmd: " << oss.str().c_str() << " failed." << std::endl;
}
}
}