Assume there are no containers if cpuset dosen't present
Change-Id: If97fd885595a3ace9691fe2ad88ec4219f43909f
Signed-off-by: jooseong.lee <jooseong.lee@samsung.com>
#include "zone-utils.h"
+#include <unistd.h>
#include <fstream>
#include <dpl/log/log.h>
//open /proc/<pid>/cpuset and get its contents
const std::string path = "/proc/" + std::to_string(pid) + "/cpuset";
+ //Assume there are no containers if cpuset dosen't present
+ if(access(path.c_str(), F_OK)!= 0) {
+ zoneId = ZONE_HOST;
+ return true;
+ }
+
std::ifstream cpusetFile(path);
if (!cpusetFile) {
LogError("Failed to open cpuset");