Create pid file when not exist
Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
parent
4a12ff6e58
commit
ff9e6adc2a
2
utils.go
2
utils.go
|
@ -261,7 +261,7 @@ func createPidFile(path string, process *libcontainer.Process) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
f, err := os.Create(path)
|
f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue