From 16a60ae5046b7463c3440d01c7f7673c071b17a7 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 3 Jan 2022 01:08:52 +0400 Subject: [PATCH] [util.go] It is better to see in a cmdline, rather than in comm. For example, matrix synapse in comm has just python3. So lets look in both comm and cmdline. --- util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.go b/util.go index b3dca68..d35070a 100644 --- a/util.go +++ b/util.go @@ -18,7 +18,7 @@ func GetProcessPIDs(name string) ([]int, error) { for _, entry := range dir { pid, err := strconv.Atoi(entry.Name()) if entry.IsDir() && err == nil { - f, err := os.ReadFile("/proc/" + entry.Name() + "/comm") + f, err := os.ReadFile("/proc/" + entry.Name() + "/cmdline") if err != nil { return nil, err }