hack/podman_cleanup_tracer.bt: check map before deleting keys

It seems the new bpftrace version since 0.22 logs a warning if we try to
delete a key that does not exist.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2025-07-08 15:39:22 +02:00
parent 1f8bc9d736
commit b59648a2d6

View File

@@ -89,7 +89,9 @@ tracepoint:sched:sched_process_exit
// process is done remove pid from map
delete(@pids[pid]);
delete(@cleanupPids[pid]);
if (@cleanupPids[pid]) {
delete(@cleanupPids[pid]);
}
}
// Trace all kill calls that target our pids.