# File lib/god/process.rb, line 267
    def ensure_stop
      unless self.pid
        applog(self, :warn, "#{self.name} stop called but pid is uknown")
        return
      end
      
      # Poll to see if it's dead
      10.times do
        begin
          ::Process.kill(0, self.pid)
        rescue Errno::ESRCH
          # It died. Good.
          return
        end
        
        sleep 1
      end
      
      # last resort
      ::Process.kill('KILL', self.pid) rescue nil
      applog(self, :warn, "#{self.name} process still running 10 seconds after stop command returned. Force killing.")
    end