diff --git a/processmanager/processinfo.go b/processmanager/processinfo.go index 8aaa6a960..683ea21ac 100644 --- a/processmanager/processinfo.go +++ b/processmanager/processinfo.go @@ -530,15 +530,14 @@ func (pm *ProcessManager) processPIDExit(pid libpf.PID) { log.Debugf("Skip process exit handling for unknown PID %d", pid) return } - if 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 _, pidExitProcessed := pm.exitEvents[pid]; !pidExitProcessed { - pm.exitEvents[pid] = exitKTime - } else { - log.Debugf("Skip duplicate process exit handling for PID %d", pid) - return - } + + // ProcessPIDExit may be called multiple times in short succession + // for the same PID, don't update exitKTime if we've previously recorded it. + if _, pidExitProcessed := pm.exitEvents[pid]; !pidExitProcessed { + pm.exitEvents[pid] = exitKTime + } else { + log.Debugf("Skip duplicate process exit handling for PID %d", pid) + return } // Delete all entries we have for this particular PID from pid_page_to_mapping_info.