[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:
parent
f536435ab0
commit
16a60ae504
2
util.go
2
util.go
@ -18,7 +18,7 @@ func GetProcessPIDs(name string) ([]int, error) {
|
|||||||
for _, entry := range dir {
|
for _, entry := range dir {
|
||||||
pid, err := strconv.Atoi(entry.Name())
|
pid, err := strconv.Atoi(entry.Name())
|
||||||
if entry.IsDir() && err == nil {
|
if entry.IsDir() && err == nil {
|
||||||
f, err := os.ReadFile("/proc/" + entry.Name() + "/comm")
|
f, err := os.ReadFile("/proc/" + entry.Name() + "/cmdline")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user