Skip to content

Commit

Permalink
Update get_ppid comment.
Browse files Browse the repository at this point in the history
Signed-off-by: David Calavera <[email protected]>
  • Loading branch information
calavera committed Jul 12, 2018
1 parent 020bcd4 commit dee18fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/execsnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ class EventType(object):
argv = defaultdict(list)

# TODO: This is best-effort PPID matching. Short-lived processes may exit
# before we get a chance to read the PPID. This should be replaced with
# fetching PPID via C when available (#364).
# before we get a chance to read the PPID.
# This is a fallback for when fetching the PPID from task->real_parent->tgip
# returns 0, which happens in some kernel versions.
def get_ppid(pid):
try:
with open("/proc/%d/status" % pid) as status:
Expand Down

0 comments on commit dee18fe

Please sign in to comment.