mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Only load PIDs for state cleaning
This commit is contained in:
parent
454a234449
commit
52d6875bc8
1 changed files with 3 additions and 3 deletions
|
@ -92,12 +92,12 @@ func (p *Process) Delete() {
|
|||
// CleanProcessStorage cleans the storage from old processes.
|
||||
func CleanProcessStorage(activePIDs map[int]struct{}) {
|
||||
// add system table of processes
|
||||
procs, err := processInfo.Processes()
|
||||
pids, err := processInfo.Pids()
|
||||
if err != nil {
|
||||
log.Warningf("process: failed to get list of active PIDs: %s", err)
|
||||
} else {
|
||||
for _, p := range procs {
|
||||
activePIDs[int(p.Pid)] = struct{}{}
|
||||
for _, pid := range pids {
|
||||
activePIDs[int(pid)] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue