159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
# File 'lib/cinchize.rb', line 159
def start_none
unless options[:ontop]
Daemonize.daemonize(output_logfile, @group.app_name) else
Daemonize.simulate
end
@pid.pid = Process.pid
at_exit {
begin; @pid.cleanup; rescue ::Exception; end
if options[:backtrace] and not options[:ontop] and not $daemons_sigterm
begin; exception_log(); rescue ::Exception; end
end
}
trap(SIGNAL) {
begin; @pid.cleanup; rescue ::Exception; end
$daemons_sigterm = true
if options[:hard_exit]
exit!
else
exit
end
}
end
|