lib/flapjack/cli/server.rb in flapjack-1.2.2 vs lib/flapjack/cli/server.rb in flapjack-1.3.0rc1
- old
+ new
@@ -58,10 +58,13 @@
runner.execute(:daemonize => @options[:daemonize]) {
File.umask(main_umask) if @options[:daemonize]
return_value = start_server
}
puts " done."
- exit_now!(return_value) unless return_value.nil?
+ unless return_value.nil? || [Signal.list['INT'] + 128,
+ Signal.list['TERM'] + 128].include?(return_value)
+ exit_now!(return_value)
+ end
end
end
def stop
pid = get_pid