Skip to content

Commit

Permalink
Renamed pidExited to pidExitProcessed
Browse files Browse the repository at this point in the history
  • Loading branch information
christos68k committed Jan 23, 2025
1 parent 5cd4b3a commit b1e2622
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions processmanager/processinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,21 +520,21 @@ func (pm *ProcessManager) ProcessPIDExit(pid libpf.PID) {
pm.mu.Lock()
defer pm.mu.Unlock()

pidExited := false
pidExitProcessed := false
info, pidExists := pm.pidToProcessInfo[pid]
if pidExists || (pm.interpreterTracerEnabled &&
len(pm.interpreters[pid]) > 0) {
// ProcessPIDExit may be called multiple times in short succession
// for the same PID, don't update exitKTime if we've previously recorded it.
if _, pidExited = pm.exitEvents[pid]; !pidExited {
if _, pidExitProcessed = pm.exitEvents[pid]; !pidExitProcessed {
pm.exitEvents[pid] = exitKTime
}
}
if !pidExists {
log.Debugf("Skip process exit handling for unknown PID %d", pid)
return
}
if pidExited {
if pidExitProcessed {
log.Debugf("Skip duplicate process exit handling for PID %d", pid)
return
}
Expand Down

0 comments on commit b1e2622

Please sign in to comment.