[Devel] [PATCH 2/3] ignore -eexist for mkdir of a cgroup

Serge Hallyn serue at us.ibm.com
Mon Feb 15 14:58:15 PST 2010


From: Serge E. Hallyn <serue at us.ibm.com>

Signed-off-by: Serge E. Hallyn <serue at us.ibm.com>
---
 nsexec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nsexec.c b/nsexec.c
index 859b6c3..8b96bc9 100644
--- a/nsexec.c
+++ b/nsexec.c
@@ -146,7 +146,7 @@ int move_to_new_cgroup(int newcgroup)
 
 	snprintf(cgroupname, 150, "%s/%d", cgroupbase, newcgroup);
 	ret = mkdir(cgroupname, 0755);
-	if (ret)
+	if (ret && errno != EEXIST)
 		return 0;
 	snprintf(tasksfname, 200, "%s/tasks", cgroupname);
 	fout = fopen(tasksfname, "w");
-- 
1.6.0.6

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list