| 325 | } |
| 326 | |
| 327 | void |
| 328 | cg_remove(void) |
| 329 | { |
| 330 | if (!cg_enable) |
| 331 | return; |
| 332 | |
| 333 | char path[PATH_MAX]; |
| 334 | cg_makepath(path, sizeof(path), NULL); |
| 335 | |
| 336 | if (dir_exists(path)) |
| 337 | { |
| 338 | msg("Removing control group\n"); |
| 339 | |
| 340 | cg_write("?cgroup.kill", "1\n"); |
| 341 | |
| 342 | if (rmdir(path) < 0) |
| 343 | die("Cannot remove control group %s: %m", path); |
| 344 | } |
| 345 | } |
no test coverage detected
searching dependent graphs…