Method: Spring::Server#set_exit_hook

Defined in:
lib/spring/server.rb

#set_exit_hookObject



107
108
109
110
111
112
# File 'lib/spring/server.rb', line 107

def set_exit_hook
  server_pid = Process.pid

  # We don't want this hook to run in any forks of the current process
  at_exit { shutdown if Process.pid == server_pid }
end