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
Branches
Tags
No related merge requests found
......@@ -10,7 +10,6 @@ import (
"strings"
"syscall"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
......@@ -89,9 +88,6 @@ func (d dnsNameFile) getProcess() (*os.Process, error) {
if err != nil {
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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment