initial import
This commit is contained in:
14
core/fs/files.go
Normal file
14
core/fs/files.go
Normal file
@@ -0,0 +1,14 @@
|
||||
// +build linux darwin
|
||||
|
||||
package fs
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func CloseOnExec(file *os.File) {
|
||||
if file != nil {
|
||||
syscall.CloseOnExec(int(file.Fd()))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user