3 # This abstract class makes it easy for subclassed Conditions to deal
4 # with commong process related tasks, like pid file cleanup
5 class ProcessCondition < Condition
6 attr_accessor :pid_file, :clean
15 valid = complain("You must specify the 'pid_file' attribute for :process_not_running") if self.pid_file.nil?
20 File.exist?(self.pid_file)
25 File.delete(self.pid_file) rescue nil