Merge "Fix the stat() return value check in createProcessGroupInternal()"
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp
index b0fcb5f..54772b6 100644
--- a/libprocessgroup/processgroup.cpp
+++ b/libprocessgroup/processgroup.cpp
@@ -464,7 +464,7 @@
     gid_t cgroup_gid = AID_SYSTEM;
     int ret = 0;
 
-    if (stat(cgroup.c_str(), &cgroup_stat) == 1) {
+    if (stat(cgroup.c_str(), &cgroup_stat) < 0) {
         PLOG(ERROR) << "Failed to get stats for " << cgroup;
     } else {
         cgroup_mode = cgroup_stat.st_mode;