From dfb52f0d93e592c3b5115b2161263fe9a267988b Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Mon, 2 Jan 2017 14:27:37 +0000 Subject: [PATCH] Clarify even further that proc/PID/net/tcp varies by namespace --- probe/endpoint/procspy/proc_linux.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/probe/endpoint/procspy/proc_linux.go b/probe/endpoint/procspy/proc_linux.go index 579d71be6..b7552a71d 100644 --- a/probe/endpoint/procspy/proc_linux.go +++ b/probe/endpoint/procspy/proc_linux.go @@ -110,10 +110,12 @@ func readProcessConnections(buf *bytes.Buffer, namespaceProcs []*process.Process // try next process continue } + // Return after succeeding on any process + // (proc/PID/net/tcp and proc/PID/net/tcp6 are identical for all the processes in the same namespace) return read+read6 > 0, nil } - // would be cool to have an or operation between errors + // It would be cool an "or" error combinator if errRead != nil { return false, errRead }