From 2ca19cca4d3019c903000fe57053b483ac0745c2 Mon Sep 17 00:00:00 2001
From: Valentin Rothberg <rothberg@redhat.com>
Date: Fri, 20 Sep 2019 11:32:43 +0200
Subject: [PATCH] getProcess(): don't lookup in proc FS

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
---
 plugins/meta/dnsname/service.go | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/plugins/meta/dnsname/service.go b/plugins/meta/dnsname/service.go
index 6922ad4..3156c1f 100644
--- a/plugins/meta/dnsname/service.go
+++ b/plugins/meta/dnsname/service.go
@@ -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)
 }
 
-- 
GitLab