MCPcopy Create free account
hub / github.com/ioi/isolate / cg_create

Function cg_create

cg.c:205–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void
206cg_create(void)
207{
208 if (!cg_enable)
209 return;
210
211 struct stat st;
212 char path[PATH_MAX];
213
214 cg_makepath(path, sizeof(path), NULL);
215 if (stat(path, &st) >= 0 || errno != ENOENT)
216 {
217 msg("Control group %s already exists, trying to empty it.\n", path);
218 if (rmdir(path) < 0)
219 die("Failed to reset control group %s: %m", path);
220 }
221
222 if (mkdir(path, 0777))
223 die("Failed to create control group %s: %m", path);
224}
225
226void
227cg_enter(void)

Callers 1

initFunction · 0.85

Calls 3

cg_makepathFunction · 0.85
msgFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…