Move get pid into cgroup implementation
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
0f44c2849c
commit
c6c0dc2ebb
5 changed files with 84 additions and 11 deletions
|
@ -1,9 +1,5 @@
|
|||
package fs
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
type devicesGroup struct {
|
||||
}
|
||||
|
||||
|
@ -12,11 +8,6 @@ func (s *devicesGroup) Set(d *data) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
os.RemoveAll(dir)
|
||||
}
|
||||
}()
|
||||
|
||||
if !d.c.DeviceAccess {
|
||||
if err := writeFile(dir, "devices.deny", "a"); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue