Open/create log file with FILE_SHARE_DELETE on windows
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -20,6 +20,7 @@ package server
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
@@ -135,3 +136,8 @@ func (c *criService) apparmorEnabled() bool {
|
||||
func (c *criService) seccompEnabled() bool {
|
||||
return runcseccomp.IsEnabled()
|
||||
}
|
||||
|
||||
// openLogFile opens/creates a container log file.
|
||||
func openLogFile(path string) (*os.File, error) {
|
||||
return os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0640)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user