Skip to content
Snippets Groups Projects
Commit 2ca19cca authored by Valentin Rothberg's avatar Valentin Rothberg
Browse files

getProcess(): don't lookup in proc FS

parent e2cc41f4
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,6 @@ import ( ...@@ -10,7 +10,6 @@ import (
"strings" "strings"
"syscall" "syscall"
"github.com/pkg/errors"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
) )
...@@ -89,9 +88,6 @@ func (d dnsNameFile) getProcess() (*os.Process, error) { ...@@ -89,9 +88,6 @@ func (d dnsNameFile) getProcess() (*os.Process, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
if _, err := os.Stat(fmt.Sprintf("/proc/%d/", pid)); os.IsNotExist(err) {
return nil, errors.Wrapf(err, "dnsmasq process with PID %d does not exist", pid)
}
return os.FindProcess(pid) return os.FindProcess(pid)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment