# File lib/mongrel/configurator.rb, line 174
174:     def daemonize(options={})
175:       ops = resolve_defaults(options)
176:       # save this for later since daemonize will hose it
177:       if RUBY_PLATFORM !~ /mswin/
178:         require 'daemons/daemonize'
179: 
180:         logfile = ops[:log_file]
181:         if logfile[0].chr != "/"
182:           logfile = File.join(ops[:cwd],logfile)
183:           if not File.exist?(File.dirname(logfile))
184:             log "!!! Log file directory not found at full path #{File.dirname(logfile)}.  Update your configuration to use a full path."
185:             exit 1
186:           end
187:         end
188: 
189:         Daemonize.daemonize(logfile)
190: 
191:         # change back to the original starting directory
192:         Dir.chdir(ops[:cwd])
193: 
194:       else
195:         log "WARNING: Win32 does not support daemon mode."
196:       end
197:     end