Browse Source

Do not check for (host) vsyscall support on the non-Linux systems

Fixes #19
tags/v1.2.1
dump_stack() 3 months ago
parent
commit
d58226c22c
Signed by: Mikhail Klementev <blame@dumpstack.io> GPG Key ID: BE44DA8C062D87DC
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      kernel.go

+ 9
- 0
kernel.go View File

@@ -15,6 +15,7 @@ import (
"os/exec"
"os/user"
"regexp"
"runtime"
"strings"
"time"

@@ -99,6 +100,14 @@ func dockerImagePath(sk config.KernelMask) (path string, 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")
if err != nil {
return

Loading…
Cancel
Save