/cgroup/<pid> may already exist
PATCH 1/1 /cgroup/<pid> may already exist
From: Sukadev Bhattiprolu <[email protected]>
Date: Fri, 11 Dec 2009 09:36:05 +0530
Subject: [PATCH] /cgroup/pid may already exist
If the process is created with -g, the /cgroup/pid directory would be created automatically.
Signed-off-by Sukadev Bhattiprolu <[email protected]>
--- ns_exec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
ns_exec.c +1 -1
@@ -148,7 +148,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" );
Signature · 1 line
1.6.0.4