src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb
# Stop the daemon and wait until it has exited.
#
# Raises:
# - StopError - the stop command failed.
# - StopTimeout - the daemon didn't stop in time.
Stop the daemon and wait until it has exited.
Raises:
StopError - the stop command failed.
StopTimeout - the daemon didn't stop in time.
Stop the daemon and wait until it has exited . Raises : StopError - the stop command failed . StopTimeout - the daemon didn ' t stop in time .
def stop
    @lock_file.exclusive_lock do
      begin
        Timeout.timeout(@stop_timeout, Timeout::Error) do
          kill_daemon if daemon_is_running?
          wait_until do
            !daemon_is_running?
          end
        end
      rescue Timeout::Error
        raise StopTimeout, "Daemon '#{@identifier}' did not exit in time"
      end
    end
  end
def stop @lock_file . exclusive_lock do begin Timeout . timeout ( @stop_timeout , Timeout :: Error ) do kill_daemon if daemon_is_running? wait_until do ! daemon_is_running? end end rescue Timeout :: Error raise StopTimeout , "Daemon '#{@identifier}' did not exit in time" end end end
Stop the daemon and wait until it has exited.
Stop the daemon and wait until it has exited .