mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
There used to be a race condition while creating the cgroup hierarchy: if a parent directory was created after .exists() but before .create_dir, the function failed unnecessarily. This commit changes the function to use create_dir_all, which is the atomic variant of the above pattern, and fixes some surrounding docstrings on the way. Signed-off-by: Markus Rudy <mr@edgeless.systems>