1
0

[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.
This commit is contained in:
Alexander Andreev 2022-01-03 01:08:52 +04:00
parent f536435ab0
commit 16a60ae504
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -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
}