lib/resque/worker.rb
def kill_child
      return unless @child

      if Process.waitpid(@child, Process::WNOHANG)
        Resque.logger.debug "Child #{@child} already quit."
        return
      end

      signal_child("TERM", @child)

      signal_child("KILL", @child) unless quit_gracefully?(@child)
    rescue SystemCallError
      Resque.logger.debug "Child #{@child} already quit and reaped."
    end
# Kills the forked child immediately with minimal remorse. The job it
# is processing will not be completed. Send the child a TERM signal,
# wait 5 seconds, and then a KILL signal if it has not quit
Kills the forked child immediately with minimal remorse. The job it
is processing will not be completed. Send the child a TERM signal,
wait 5 seconds, and then a KILL signal if it has not quit
Kills the forked child immediately with minimal remorse . The job it is processing will not be completed . Send the child a TERM signal wait 5 seconds and then a KILL signal if it has not quit
def kill_child
      return unless @child
      if Process.waitpid(@child, Process::WNOHANG)
        Resque.logger.debug "Child #{@child} already quit."
        return
      end
      signal_child("TERM", @child)
      signal_child("KILL", @child) unless quit_gracefully?(@child)
    rescue SystemCallError
      Resque.logger.debug "Child #{@child} already quit and reaped."
    end
def kill_child return unless @child if Process . waitpid ( @child , Process :: WNOHANG ) Resque . logger . debug "Child #{@child} already quit." return end signal_child ( "TERM" , @child ) signal_child ( "KILL" , @child ) unless quit_gracefully? ( @child ) rescue SystemCallError Resque . logger . debug "Child #{@child} already quit and reaped." end
Kills the forked child immediately with minimal remorse.
Kills the forked child immediately with minimal remorse .