Do not check for (host) vsyscall support on the non-Linux systems
Fixes #19
This commit is contained in:
parent
9e1d71d1b2
commit
d58226c22c
@ -15,6 +15,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"os/user"
|
"os/user"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -99,6 +100,14 @@ func dockerImagePath(sk config.KernelMask) (path string, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func vsyscallAvailable() (available bool, err error) {
|
func vsyscallAvailable() (available bool, err error) {
|
||||||
|
if runtime.GOOS != "linux" {
|
||||||
|
// Docker for non-Linux systems is not using the host
|
||||||
|
// kernel but uses kernel inside a virtual machine, so
|
||||||
|
// it builds by the Docker team with vsyscall support.
|
||||||
|
available = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
buf, err := ioutil.ReadFile("/proc/self/maps")
|
buf, err := ioutil.ReadFile("/proc/self/maps")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user