mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29: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.
|
// CleanProcessStorage cleans the storage from old processes.
|
||||||
func CleanProcessStorage(activePIDs map[int]struct{}) {
|
func CleanProcessStorage(activePIDs map[int]struct{}) {
|
||||||
// add system table of processes
|
// add system table of processes
|
||||||
procs, err := processInfo.Processes()
|
pids, err := processInfo.Pids()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warningf("process: failed to get list of active PIDs: %s", err)
|
log.Warningf("process: failed to get list of active PIDs: %s", err)
|
||||||
} else {
|
} else {
|
||||||
for _, p := range procs {
|
for _, pid := range pids {
|
||||||
activePIDs[int(p.Pid)] = struct{}{}
|
activePIDs[int(pid)] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue