Codebase list debian-goodies / f8b538e
Add other command interpreters: ruby (common) and tclsh (infrequent) Javier Fernandez-Sanguino 9 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
552552
553553 try:
554554 self.program = os.readlink('/proc/%d/exe' % self.pid)
555 # if the executable command is an interpreter such as perl/python,
555 # if the executable command is an interpreter such as perl/python/ruby/tclsh,
556556 # we want to find the real program
557 m = re.match("^/usr/bin/(perl|python)", self.program)
557 m = re.match("^/usr/bin/(perl|python|ruby|tclsh)", self.program)
558558 if m:
559559 with open('/proc/%d/cmdline' % self.pid, 'r') as cmdline:
560560 # only match program in /usr (ex.: /usr/sbin/smokeping)