Merge "Update KillFilter to handle 'deleted' exe's."

This commit is contained in:
Jenkins 2012-03-30 00:28:24 +00:00 committed by Gerrit Code Review
commit 7bd863faf4

View File

@ -117,6 +117,9 @@ class KillFilter(CommandFilter):
return False
try:
command = os.readlink("/proc/%d/exe" % int(args[1]))
# NOTE(dprince): /proc/PID/exe may have ' (deleted)' on
# the end if an executable is updated or deleted
command = command.rstrip(" (deleted)")
if command not in self.args[1]:
# Affected executable not in accepted list
return False