Create pid file when not exist

Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
rajasec 2016-02-26 13:10:30 +05:30
parent 4a12ff6e58
commit ff9e6adc2a
1 changed files with 1 additions and 1 deletions

View File

@ -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
} }