public
Description: A very fast & simple Ruby web server
Homepage: http://code.macournoyer.com/thin/
Clone URL: git://github.com/macournoyer/thin.git
Search Repo:
Couple fixes to make it work under windows.
Narrow help screen to fit in ~80 chars.
macournoyer (author)
Thu Feb 21 11:43:25 -0800 2008
commit  adb74dfa1540eb56a88afaf692bdba40911d59ee
tree    2d3eb97e05543449bc076880f3c98798f606a5f6
parent  e9b45d9dcaa97e2d9f42d7fb9f1385ed61738206
...
66
67
68
69
 
70
71
72
73
...
98
99
100
101
 
102
103
 
104
105
106
...
66
67
68
 
69
70
71
72
73
...
98
99
100
 
101
102
 
103
104
105
106
0
@@ -66,7 +66,7 @@
0
                                            "(default: #{@options[:environment]})") { |env| @options[:environment] = env }
0
         opts.on("-c", "--chdir DIR", "Change to dir before starting") { |dir| @options[:chdir] = File.expand_path(dir) }
0
         opts.on("-r", "--rackup FILE", "Load a Rack config file instead of " +
0
- "the Rails adapter") { |file| @options[:rackup] = file }
0
+ "Rails adapter") { |file| @options[:rackup] = file }
0
         opts.on( "--prefix PATH", "Mount the app under PATH (start with /)") { |path| @options[:prefix] = path }
0
         opts.on( "--stats PATH", "Mount the Stats adapter under PATH") { |path| @options[:stats] = path }
0
         
0
0
@@ -98,9 +98,9 @@
0
                                        "(default: #{@options[:timeout]})") { |sec| @options[:timeout] = sec.to_i }
0
         opts.on( "--max-conns NUM",
0
                         "Maximum number of connections (default: #{@options[:max_conns]})",
0
- "Might require superuser privileges to set higher then 1024") { |num| @options[:max_conns] = num.to_i }
0
+ "Might require sudo to set higher then 1024") { |num| @options[:max_conns] = num.to_i } unless Thin.win?
0
         opts.on( "--max-persistent-conns NUM",
0
- "Maximum number of persistent connections " +
0
+ "Maximum number of persistent connections",
0
                         "(default: #{@options[:max_persistent_conns]})") { |num| @options[:max_persistent_conns] = num.to_i }
0
         
0
         opts.separator ""
...
188
189
190
 
 
191
192
193
...
212
213
214
215
 
216
217
218
...
188
189
190
191
192
193
194
195
...
214
215
216
 
217
218
219
220
0
@@ -188,6 +188,8 @@
0
     # The process needs to have required privilege to set it higher the 1024 on
0
     # some systems.
0
     def set_descriptor_table_size!
0
+ return 0 if Thin.win? # Not supported on Windows
0
+
0
       requested_maximum_connections = @maximum_connections
0
       @maximum_connections = EventMachine.set_descriptor_table_size(requested_maximum_connections)
0
 
0
@@ -212,7 +214,7 @@
0
       end
0
       
0
       def setup_signals
0
- trap('QUIT') { stop }
0
+ trap('QUIT') { stop } unless Thin.win?
0
         trap('INT') { stop! }
0
         trap('TERM') { stop! }
0
       end

Comments

    No one has commented yet.