Merge pull request #597 from rajasec/pidfile

Create pid file when not exist
This commit is contained in:
Mrunal Patel 2016-03-09 15:18:49 -08:00
commit c40bd432cd
1 changed files with 1 additions and 1 deletions

View File

@ -282,7 +282,7 @@ func createPidFile(path string, process *libcontainer.Process) error {
if err != nil {
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 {
return err
}