[yum-commits] needs-restarting.py
skvidal at osuosl.org
skvidal at osuosl.org
Mon Aug 29 17:10:13 UTC 2011
needs-restarting.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 81f18617756866700c86ae34989edc7d0e71478d
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Mon Aug 29 13:09:49 2011 -0400
check for '/' not 'fd:' to match file lines
diff --git a/needs-restarting.py b/needs-restarting.py
index 20415e6..ae351ac 100755
--- a/needs-restarting.py
+++ b/needs-restarting.py
@@ -83,10 +83,10 @@ def get_open_files(pid):
return files
for line in maps.readlines():
- if line.find('fd:') == -1:
+ slash = line.find('/')
+ if slash == -1 or line.find('00:') != -1: # if we don't have a '/' or if we fine 00: in the file then it's not _REALLY_ a file
continue
line = line.replace('\n', '')
- slash = line.find('/')
filename = line[slash:]
#filename = filename.replace('(deleted)', '') #only mildly retarded
filename = filename.strip()
More information about the Yum-commits
mailing list