mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-11-04 14:49:53 +08:00
cgroup: use rmdir to delete cgroup
This commit is contained in:
parent
51b53cf60b
commit
f6f057edf9
@ -116,7 +116,9 @@ func DetectType() Type {
|
|||||||
|
|
||||||
func remove(name string) error {
|
func remove(name string) error {
|
||||||
if name != "" {
|
if name != "" {
|
||||||
return os.Remove(name)
|
// os.Remove tried to Unlink, then Rmdir. Since we only delete directories, use
|
||||||
|
// Rmdir directly
|
||||||
|
return syscall.Rmdir(name)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user