mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 07:47:05 +00:00
When creating the lxc cgroup directory, ignore -EEXIST
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com
This commit is contained in:
parent
f02ce27d4b
commit
e7f40d8aab
@ -419,10 +419,13 @@ static int lxc_one_cgroup_create(const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* if cgparent does not exist, create it */
|
/* if cgparent does not exist, create it */
|
||||||
if (access(cgparent, F_OK) && mkdir(cgparent, 0755)) {
|
if (access(cgparent, F_OK)) {
|
||||||
|
ret = mkdir(cgparent, 0755);
|
||||||
|
if (ret == -1 && errno == EEXIST) {
|
||||||
SYSERROR("failed to create '%s' directory", cgparent);
|
SYSERROR("failed to create '%s' directory", cgparent);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There is a previous cgroup. Try to delete it. If that fails
|
* There is a previous cgroup. Try to delete it. If that fails
|
||||||
|
Loading…
Reference in New Issue
Block a user