# File lib/mongrel/configurator.rb, line 350
350:     def setup_signals(options={})
351:       ops = resolve_defaults(options)
352: 
353:       # forced shutdown, even if previously restarted (actually just like TERM but for CTRL-C)
354:       trap("INT") { log "INT signal received."; stop(false) }
355: 
356:       # clean up the pid file always
357:       at_exit { remove_pid_file }
358: 
359:       if RUBY_PLATFORM !~ /mswin/
360:         # graceful shutdown
361:         trap("TERM") { log "TERM signal received."; stop }
362:         trap("USR1") { log "USR1 received, toggling $mongrel_debug_client to #{!$mongrel_debug_client}"; $mongrel_debug_client = !$mongrel_debug_client }
363:         # restart
364:         trap("USR2") { log "USR2 signal received."; stop(true) }
365: 
366:         log "Signals ready.  TERM => stop.  USR2 => restart.  INT => stop (no restart)."
367:       else
368:         log "Signals ready.  INT => stop (no restart)."
369:       end
370:     end