passenger 3.0.5 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (198) hide show
  1. data/NEWS +19 -1
  2. data/build/packaging.rb +0 -1
  3. data/doc/cxxapi/Constants_8h_source.html +1 -1
  4. data/doc/cxxapi/Logging_8h_source.html +3 -3
  5. data/doc/cxxapi/MessageChannel_8h_source.html +2 -2
  6. data/doc/cxxapi/Utils_8h_source.html +407 -397
  7. data/doc/cxxapi/namespacePassenger.html +32 -0
  8. data/doc/cxxapi/namespacemembers.html +56 -1
  9. data/doc/cxxapi/namespacemembers_func.html +3 -0
  10. data/doc/cxxapi/ngx__http__passenger__module_8h_source.html +5 -5
  11. data/ext/apache2/Hooks.cpp +1 -1
  12. data/ext/common/AgentBase.cpp +86 -11
  13. data/ext/common/Constants.h +1 -1
  14. data/ext/common/Logging.h +3 -3
  15. data/ext/common/LoggingAgent/FilterSupport.h +1 -0
  16. data/ext/common/LoggingAgent/Main.cpp +8 -1
  17. data/ext/common/MessageChannel.h +2 -2
  18. data/ext/common/Utils.cpp +27 -3
  19. data/ext/common/Utils.h +10 -0
  20. data/ext/common/Watchdog.cpp +27 -1
  21. data/ext/nginx/HelperAgent.cpp +8 -8
  22. data/ext/oxt/thread.hpp +2 -2
  23. data/lib/phusion_passenger.rb +1 -1
  24. data/lib/phusion_passenger/abstract_installer.rb +6 -0
  25. data/lib/phusion_passenger/abstract_request_handler.rb +13 -2
  26. data/lib/phusion_passenger/analytics_logger.rb +15 -4
  27. data/lib/phusion_passenger/dependencies.rb +11 -26
  28. data/lib/phusion_passenger/platform_info.rb +96 -5
  29. data/lib/phusion_passenger/platform_info/apache.rb +13 -3
  30. data/lib/phusion_passenger/platform_info/compiler.rb +5 -0
  31. data/lib/phusion_passenger/rack/application_spawner.rb +3 -2
  32. data/lib/phusion_passenger/standalone/runtime_installer.rb +0 -1
  33. data/lib/phusion_passenger/standalone/start_command.rb +15 -8
  34. data/lib/phusion_passenger/templates/standalone/config.erb +1 -0
  35. metadata +5 -182
  36. data/doc/rdoc/classes/ConditionVariable.html +0 -215
  37. data/doc/rdoc/classes/Exception.html +0 -120
  38. data/doc/rdoc/classes/GC.html +0 -113
  39. data/doc/rdoc/classes/IO.html +0 -221
  40. data/doc/rdoc/classes/PhusionPassenger.html +0 -397
  41. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +0 -180
  42. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +0 -647
  43. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +0 -654
  44. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/InvalidPassword.html +0 -92
  45. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +0 -97
  46. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +0 -96
  47. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +0 -97
  48. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +0 -96
  49. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +0 -619
  50. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +0 -142
  51. data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats.html +0 -368
  52. data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats/Process.html +0 -231
  53. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance.html +0 -588
  54. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/CorruptedDirectoryError.html +0 -92
  55. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/GenerationsAbsentError.html +0 -92
  56. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Group.html +0 -147
  57. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Process.html +0 -279
  58. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/RoleDeniedError.html +0 -92
  59. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/StaleDirectoryError.html +0 -92
  60. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Stats.html +0 -123
  61. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/UnsupportedGenerationStructureVersionError.html +0 -92
  62. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger.html +0 -368
  63. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Lock.html +0 -194
  64. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Log.html +0 -299
  65. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/SharedData.html +0 -206
  66. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +0 -155
  67. data/doc/rdoc/classes/PhusionPassenger/AppProcess.html +0 -367
  68. data/doc/rdoc/classes/PhusionPassenger/ClassicRails.html +0 -95
  69. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner.html +0 -351
  70. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner/Error.html +0 -98
  71. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/CGIFixed.html +0 -200
  72. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner.html +0 -410
  73. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner/Error.html +0 -98
  74. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/RequestHandler.html +0 -156
  75. data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions.html +0 -115
  76. data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions/AnalyticsLogging.html +0 -202
  77. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +0 -172
  78. data/doc/rdoc/classes/PhusionPassenger/DebugLogging.html +0 -273
  79. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +0 -145
  80. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +0 -162
  81. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +0 -141
  82. data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +0 -92
  83. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +0 -673
  84. data/doc/rdoc/classes/PhusionPassenger/MessageChannel/InvalidHashError.html +0 -92
  85. data/doc/rdoc/classes/PhusionPassenger/MessageClient.html +0 -415
  86. data/doc/rdoc/classes/PhusionPassenger/NativeSupportLoader.html +0 -134
  87. data/doc/rdoc/classes/PhusionPassenger/Packaging.html +0 -129
  88. data/doc/rdoc/classes/PhusionPassenger/PlatformInfo.html +0 -1972
  89. data/doc/rdoc/classes/PhusionPassenger/Plugin.html +0 -237
  90. data/doc/rdoc/classes/PhusionPassenger/Rack.html +0 -91
  91. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +0 -312
  92. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner/Error.html +0 -98
  93. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +0 -218
  94. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions.html +0 -114
  95. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging.html +0 -259
  96. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ACExtension.html +0 -139
  97. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ASBenchmarkableExtension.html +0 -118
  98. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ExceptionLogger.html +0 -135
  99. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +0 -378
  100. data/doc/rdoc/classes/PhusionPassenger/Standalone.html +0 -111
  101. data/doc/rdoc/classes/PhusionPassenger/Standalone/AppFinder.html +0 -252
  102. data/doc/rdoc/classes/PhusionPassenger/Standalone/Command.html +0 -161
  103. data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile.html +0 -368
  104. data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile/DisallowedContextError.html +0 -132
  105. data/doc/rdoc/classes/PhusionPassenger/Standalone/HelpCommand.html +0 -151
  106. data/doc/rdoc/classes/PhusionPassenger/Standalone/Main.html +0 -189
  107. data/doc/rdoc/classes/PhusionPassenger/Standalone/PackageRuntimeCommand.html +0 -177
  108. data/doc/rdoc/classes/PhusionPassenger/Standalone/RuntimeInstaller.html +0 -341
  109. data/doc/rdoc/classes/PhusionPassenger/Standalone/StartCommand.html +0 -203
  110. data/doc/rdoc/classes/PhusionPassenger/Standalone/StatusCommand.html +0 -156
  111. data/doc/rdoc/classes/PhusionPassenger/Standalone/StopCommand.html +0 -168
  112. data/doc/rdoc/classes/PhusionPassenger/Standalone/Utils.html +0 -86
  113. data/doc/rdoc/classes/PhusionPassenger/Standalone/VersionCommand.html +0 -135
  114. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +0 -125
  115. data/doc/rdoc/classes/PhusionPassenger/Utils.html +0 -1543
  116. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher.html +0 -204
  117. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/DirInfo.html +0 -171
  118. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/FileInfo.html +0 -140
  119. data/doc/rdoc/classes/PhusionPassenger/Utils/HostsFileParser.html +0 -260
  120. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +0 -194
  121. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +0 -265
  122. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +0 -120
  123. data/doc/rdoc/classes/PhusionPassenger/Utils/UnseekableSocket.html +0 -561
  124. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +0 -140
  125. data/doc/rdoc/classes/PhusionPassenger/WSGI.html +0 -89
  126. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +0 -182
  127. data/doc/rdoc/classes/Process.html +0 -115
  128. data/doc/rdoc/classes/Signal.html +0 -139
  129. data/doc/rdoc/created.rid +0 -1
  130. data/doc/rdoc/files/DEVELOPERS_TXT.html +0 -280
  131. data/doc/rdoc/files/README.html +0 -157
  132. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +0 -130
  133. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +0 -135
  134. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +0 -126
  135. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +0 -128
  136. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/memory_stats_rb.html +0 -126
  137. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/server_instance_rb.html +0 -132
  138. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +0 -122
  139. data/doc/rdoc/files/lib/phusion_passenger/analytics_logger_rb.html +0 -129
  140. data/doc/rdoc/files/lib/phusion_passenger/app_process_rb.html +0 -127
  141. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/application_spawner_rb.html +0 -141
  142. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/cgi_fixed_rb.html +0 -126
  143. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/framework_spawner_rb.html +0 -146
  144. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/request_handler_rb.html +0 -125
  145. data/doc/rdoc/files/lib/phusion_passenger/classic_rails_extensions/init_rb.html +0 -132
  146. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +0 -126
  147. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +0 -122
  148. data/doc/rdoc/files/lib/phusion_passenger/debug_logging_rb.html +0 -122
  149. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +0 -147
  150. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +0 -122
  151. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +0 -127
  152. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +0 -120
  153. data/doc/rdoc/files/lib/phusion_passenger/message_client_rb.html +0 -127
  154. data/doc/rdoc/files/lib/phusion_passenger/native_support_rb.html +0 -132
  155. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +0 -122
  156. data/doc/rdoc/files/lib/phusion_passenger/platform_info/apache_rb.html +0 -127
  157. data/doc/rdoc/files/lib/phusion_passenger/platform_info/binary_compatibility_rb.html +0 -129
  158. data/doc/rdoc/files/lib/phusion_passenger/platform_info/compiler_rb.html +0 -127
  159. data/doc/rdoc/files/lib/phusion_passenger/platform_info/curl_rb.html +0 -126
  160. data/doc/rdoc/files/lib/phusion_passenger/platform_info/documentation_tools_rb.html +0 -126
  161. data/doc/rdoc/files/lib/phusion_passenger/platform_info/linux_rb.html +0 -126
  162. data/doc/rdoc/files/lib/phusion_passenger/platform_info/operating_system_rb.html +0 -127
  163. data/doc/rdoc/files/lib/phusion_passenger/platform_info/ruby_rb.html +0 -128
  164. data/doc/rdoc/files/lib/phusion_passenger/platform_info/zlib_rb.html +0 -126
  165. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +0 -122
  166. data/doc/rdoc/files/lib/phusion_passenger/plugin_rb.html +0 -127
  167. data/doc/rdoc/files/lib/phusion_passenger/public_api_rb.html +0 -127
  168. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +0 -137
  169. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +0 -125
  170. data/doc/rdoc/files/lib/phusion_passenger/rails3_extensions/init_rb.html +0 -127
  171. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +0 -122
  172. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +0 -160
  173. data/doc/rdoc/files/lib/phusion_passenger/standalone/app_finder_rb.html +0 -127
  174. data/doc/rdoc/files/lib/phusion_passenger/standalone/command_rb.html +0 -136
  175. data/doc/rdoc/files/lib/phusion_passenger/standalone/config_file_rb.html +0 -126
  176. data/doc/rdoc/files/lib/phusion_passenger/standalone/help_command_rb.html +0 -126
  177. data/doc/rdoc/files/lib/phusion_passenger/standalone/main_rb.html +0 -126
  178. data/doc/rdoc/files/lib/phusion_passenger/standalone/package_runtime_command_rb.html +0 -127
  179. data/doc/rdoc/files/lib/phusion_passenger/standalone/runtime_installer_rb.html +0 -133
  180. data/doc/rdoc/files/lib/phusion_passenger/standalone/start_command_rb.html +0 -136
  181. data/doc/rdoc/files/lib/phusion_passenger/standalone/status_command_rb.html +0 -126
  182. data/doc/rdoc/files/lib/phusion_passenger/standalone/stop_command_rb.html +0 -126
  183. data/doc/rdoc/files/lib/phusion_passenger/standalone/utils_rb.html +0 -126
  184. data/doc/rdoc/files/lib/phusion_passenger/standalone/version_command_rb.html +0 -127
  185. data/doc/rdoc/files/lib/phusion_passenger/utils/file_system_watcher_rb.html +0 -126
  186. data/doc/rdoc/files/lib/phusion_passenger/utils/hosts_file_parser_rb.html +0 -120
  187. data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +0 -100
  188. data/doc/rdoc/files/lib/phusion_passenger/utils/tmpdir_rb.html +0 -122
  189. data/doc/rdoc/files/lib/phusion_passenger/utils/unseekable_socket_rb.html +0 -126
  190. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +0 -179
  191. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +0 -132
  192. data/doc/rdoc/fr_class_index.html +0 -139
  193. data/doc/rdoc/fr_file_index.html +0 -108
  194. data/doc/rdoc/fr_method_index.html +0 -439
  195. data/doc/rdoc/index.html +0 -26
  196. data/doc/rdoc/rdoc-style.css +0 -187
  197. data/ext/common/libboost_oxt/aggregate.cpp +0 -10
  198. data/ext/common/libpassenger_common/aggregate.cpp +0 -16
@@ -212,14 +212,24 @@ module PlatformInfo
212
212
  # (http://code.google.com/p/phusion-passenger/issues/detail?id=236)
213
213
  output = `file "#{httpd}"`.strip
214
214
  if output =~ /Mach-O fat file/ && output !~ /for architecture/
215
- architectures = ["-arch i386 -arch ppc -arch x86_64 -arch ppc64"]
215
+ architectures = ["i386", "ppc", "x86_64", "ppc64"]
216
216
  else
217
217
  architectures = []
218
218
  output.split("\n").grep(/for architecture/).each do |line|
219
219
  line =~ /for architecture (.*?)\)/
220
- architectures << "-arch #{$1}"
220
+ architectures << $1
221
221
  end
222
222
  end
223
+ # The compiler may not support all architectures in the binary.
224
+ # XCode 4 seems to have removed support for the PPC architecture
225
+ # even though there are still plenty of Apache binaries around
226
+ # containing PPC components.
227
+ architectures.reject! do |arch|
228
+ !compiler_supports_architecture?(arch)
229
+ end
230
+ architectures.map! do |arch|
231
+ "-arch #{arch}"
232
+ end
223
233
  flags << architectures.compact.join(' ')
224
234
  end
225
235
  return flags.compact.join(' ').strip
@@ -264,7 +274,7 @@ module PlatformInfo
264
274
  # headers are placed into the same directory as the Apache headers,
265
275
  # and so 'apr-config' and 'apu-config' won't be necessary in that case.
266
276
  def self.apr_config_needed_for_building_apache_modules?
267
- filename = File.join("/tmp/passenger-platform-check-#{Process.pid}.c")
277
+ filename = File.join("#{test_exe_outdir}/passenger-platform-check-#{Process.pid}.c")
268
278
  File.open(filename, "w") do |f|
269
279
  f.puts("#include <apr.h>")
270
280
  end
@@ -46,6 +46,11 @@ module PlatformInfo
46
46
  end
47
47
  memoize :gnu_make, true
48
48
 
49
+ # Checks whether the compiler supports "-arch #{arch}".
50
+ def self.compiler_supports_architecture?(arch)
51
+ return try_compile(:c, '', "-arch #{arch}")
52
+ end
53
+
49
54
  def self.compiler_supports_visibility_flag?
50
55
  return try_compile(:c, '', '-fvisibility=hidden')
51
56
  end
@@ -217,8 +217,9 @@ private
217
217
  # itself doesn't preload Rack. This is necessary because some broken
218
218
  # Rails apps explicitly specify a Rack version as dependency.
219
219
  require 'rack'
220
- rackup_code = ::File.read("config.ru")
221
- eval("Rack::Builder.new {( #{rackup_code}\n )}.to_app", TOPLEVEL_BINDING, "config.ru")
220
+ rackup_file = ENV["RACKUP_FILE"] || "config.ru"
221
+ rackup_code = ::File.read(rackup_file)
222
+ eval("Rack::Builder.new {( #{rackup_code}\n )}.to_app", TOPLEVEL_BINDING, rackup_file)
222
223
  end
223
224
  private_class_method :load_rack_app
224
225
  end
@@ -86,7 +86,6 @@ protected
86
86
  Dependencies::Curl_Dev,
87
87
  Dependencies::OpenSSL_Dev,
88
88
  Dependencies::Zlib_Dev,
89
- Dependencies::File_Tail,
90
89
  Dependencies::Daemon_Controller,
91
90
  ]
92
91
  if Dependencies.fastthread_required?
@@ -145,6 +145,10 @@ private
145
145
  wrap_desc("Framework environment (default: #{@options[:env]})")) do |value|
146
146
  @options[:env] = value
147
147
  end
148
+ opts.on("-R", "--rackup FILE", String,
149
+ wrap_desc("If Rack application detected, run this rackup file")) do |value|
150
+ ENV["RACKUP_FILE"] = value
151
+ end
148
152
  opts.on("--max-pool-size NUMBER", Integer,
149
153
  wrap_desc("Maximum number of application processes (default: #{@options[:max_pool_size]})")) do |value|
150
154
  @options[:max_pool_size] = value
@@ -406,20 +410,23 @@ private
406
410
  if File.exist?(log_file)
407
411
  backward = 0
408
412
  else
409
- # File::Tail bails out if the file doesn't exist, so wait until it exists.
413
+ # tail bails out if the file doesn't exist, so wait until it exists.
410
414
  while !File.exist?(log_file)
411
415
  sleep 1
412
416
  end
413
417
  backward = 10
414
418
  end
415
419
 
416
- File::Tail::Logfile.open(log_file, :backward => backward) do |log|
417
- log.interval = 0.1
418
- log.max_interval = 1
419
- log.tail do |line|
420
- @console_mutex.synchronize do
421
- STDOUT.write(line)
422
- STDOUT.flush
420
+ IO.popen("tail -f -n #{backward} \"#{log_file}\"", "rb") do |f|
421
+ while true
422
+ begin
423
+ line = f.readline
424
+ @console_mutex.synchronize do
425
+ STDOUT.write(line)
426
+ STDOUT.flush
427
+ end
428
+ rescue EOFError
429
+ break
423
430
  end
424
431
  end
425
432
  end
@@ -44,6 +44,7 @@ http {
44
44
  passenger_max_pool_size <%= @options[:max_pool_size] %>;
45
45
  passenger_min_instances <%= @options[:min_instances] %>;
46
46
  <% if @options[:user] %>passenger_default_user <%= @options[:user] %>;<% end %>
47
+ <% if debugging? %>passenger_log_level 2;<% end %>
47
48
 
48
49
  <% if @options[:union_station_gateway_address] %>
49
50
  union_station_gateway_address <%= @options[:union_station_gateway_address] %>;
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 5
10
- version: 3.0.5
9
+ - 6
10
+ version: 3.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Phusion - http://www.phusion.nl/
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-11 00:00:00 +01:00
18
+ date: 2011-04-03 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -67,7 +67,7 @@ dependencies:
67
67
  type: :runtime
68
68
  version_requirements: *id003
69
69
  - !ruby/object:Gem::Dependency
70
- name: file-tail
70
+ name: rack
71
71
  prerelease: false
72
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
73
  none: false
@@ -80,20 +80,6 @@ dependencies:
80
80
  version: "0"
81
81
  type: :runtime
82
82
  version_requirements: *id004
83
- - !ruby/object:Gem::Dependency
84
- name: rack
85
- prerelease: false
86
- requirement: &id005 !ruby/object:Gem::Requirement
87
- none: false
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- hash: 3
92
- segments:
93
- - 0
94
- version: "0"
95
- type: :runtime
96
- version_requirements: *id005
97
83
  description: Easy and robust Ruby web application deployment.
98
84
  email: info@phusion.nl
99
85
  executables:
@@ -669,167 +655,6 @@ files:
669
655
  - doc/images/spawn_server_architecture.svg
670
656
  - doc/images/typical_isolated_web_application.png
671
657
  - doc/images/typical_isolated_web_application.svg
672
- - doc/rdoc/classes/ConditionVariable.html
673
- - doc/rdoc/classes/Exception.html
674
- - doc/rdoc/classes/GC.html
675
- - doc/rdoc/classes/IO.html
676
- - doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html
677
- - doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html
678
- - doc/rdoc/classes/PhusionPassenger/AbstractServer/InvalidPassword.html
679
- - doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html
680
- - doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html
681
- - doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html
682
- - doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html
683
- - doc/rdoc/classes/PhusionPassenger/AbstractServer.html
684
- - doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html
685
- - doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats/Process.html
686
- - doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats.html
687
- - doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/CorruptedDirectoryError.html
688
- - doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/GenerationsAbsentError.html
689
- - doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Group.html
690
- - doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Process.html
691
- - doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/RoleDeniedError.html
692
- - doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/StaleDirectoryError.html
693
- - doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Stats.html
694
- - doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/UnsupportedGenerationStructureVersionError.html
695
- - doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance.html
696
- - doc/rdoc/classes/PhusionPassenger/AdminTools.html
697
- - doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Lock.html
698
- - doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Log.html
699
- - doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/SharedData.html
700
- - doc/rdoc/classes/PhusionPassenger/AnalyticsLogger.html
701
- - doc/rdoc/classes/PhusionPassenger/AppInitError.html
702
- - doc/rdoc/classes/PhusionPassenger/AppProcess.html
703
- - doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner/Error.html
704
- - doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner.html
705
- - doc/rdoc/classes/PhusionPassenger/ClassicRails/CGIFixed.html
706
- - doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner/Error.html
707
- - doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner.html
708
- - doc/rdoc/classes/PhusionPassenger/ClassicRails/RequestHandler.html
709
- - doc/rdoc/classes/PhusionPassenger/ClassicRails.html
710
- - doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions/AnalyticsLogging.html
711
- - doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions.html
712
- - doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html
713
- - doc/rdoc/classes/PhusionPassenger/DebugLogging.html
714
- - doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html
715
- - doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html
716
- - doc/rdoc/classes/PhusionPassenger/InitializationError.html
717
- - doc/rdoc/classes/PhusionPassenger/InvalidPath.html
718
- - doc/rdoc/classes/PhusionPassenger/MessageChannel/InvalidHashError.html
719
- - doc/rdoc/classes/PhusionPassenger/MessageChannel.html
720
- - doc/rdoc/classes/PhusionPassenger/MessageClient.html
721
- - doc/rdoc/classes/PhusionPassenger/NativeSupportLoader.html
722
- - doc/rdoc/classes/PhusionPassenger/Packaging.html
723
- - doc/rdoc/classes/PhusionPassenger/PlatformInfo.html
724
- - doc/rdoc/classes/PhusionPassenger/Plugin.html
725
- - doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner/Error.html
726
- - doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html
727
- - doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html
728
- - doc/rdoc/classes/PhusionPassenger/Rack.html
729
- - doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ACExtension.html
730
- - doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ASBenchmarkableExtension.html
731
- - doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ExceptionLogger.html
732
- - doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging.html
733
- - doc/rdoc/classes/PhusionPassenger/Rails3Extensions.html
734
- - doc/rdoc/classes/PhusionPassenger/SpawnManager.html
735
- - doc/rdoc/classes/PhusionPassenger/Standalone/AppFinder.html
736
- - doc/rdoc/classes/PhusionPassenger/Standalone/Command.html
737
- - doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile/DisallowedContextError.html
738
- - doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile.html
739
- - doc/rdoc/classes/PhusionPassenger/Standalone/HelpCommand.html
740
- - doc/rdoc/classes/PhusionPassenger/Standalone/Main.html
741
- - doc/rdoc/classes/PhusionPassenger/Standalone/PackageRuntimeCommand.html
742
- - doc/rdoc/classes/PhusionPassenger/Standalone/RuntimeInstaller.html
743
- - doc/rdoc/classes/PhusionPassenger/Standalone/StartCommand.html
744
- - doc/rdoc/classes/PhusionPassenger/Standalone/StatusCommand.html
745
- - doc/rdoc/classes/PhusionPassenger/Standalone/StopCommand.html
746
- - doc/rdoc/classes/PhusionPassenger/Standalone/Utils.html
747
- - doc/rdoc/classes/PhusionPassenger/Standalone/VersionCommand.html
748
- - doc/rdoc/classes/PhusionPassenger/Standalone.html
749
- - doc/rdoc/classes/PhusionPassenger/UnknownError.html
750
- - doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/DirInfo.html
751
- - doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/FileInfo.html
752
- - doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher.html
753
- - doc/rdoc/classes/PhusionPassenger/Utils/HostsFileParser.html
754
- - doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html
755
- - doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html
756
- - doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html
757
- - doc/rdoc/classes/PhusionPassenger/Utils/UnseekableSocket.html
758
- - doc/rdoc/classes/PhusionPassenger/Utils.html
759
- - doc/rdoc/classes/PhusionPassenger/VersionNotFound.html
760
- - doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html
761
- - doc/rdoc/classes/PhusionPassenger/WSGI.html
762
- - doc/rdoc/classes/PhusionPassenger.html
763
- - doc/rdoc/classes/Process.html
764
- - doc/rdoc/classes/Signal.html
765
- - doc/rdoc/created.rid
766
- - doc/rdoc/files/DEVELOPERS_TXT.html
767
- - doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html
768
- - doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html
769
- - doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html
770
- - doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html
771
- - doc/rdoc/files/lib/phusion_passenger/admin_tools/memory_stats_rb.html
772
- - doc/rdoc/files/lib/phusion_passenger/admin_tools/server_instance_rb.html
773
- - doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html
774
- - doc/rdoc/files/lib/phusion_passenger/analytics_logger_rb.html
775
- - doc/rdoc/files/lib/phusion_passenger/app_process_rb.html
776
- - doc/rdoc/files/lib/phusion_passenger/classic_rails/application_spawner_rb.html
777
- - doc/rdoc/files/lib/phusion_passenger/classic_rails/cgi_fixed_rb.html
778
- - doc/rdoc/files/lib/phusion_passenger/classic_rails/framework_spawner_rb.html
779
- - doc/rdoc/files/lib/phusion_passenger/classic_rails/request_handler_rb.html
780
- - doc/rdoc/files/lib/phusion_passenger/classic_rails_extensions/init_rb.html
781
- - doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html
782
- - doc/rdoc/files/lib/phusion_passenger/constants_rb.html
783
- - doc/rdoc/files/lib/phusion_passenger/debug_logging_rb.html
784
- - doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html
785
- - doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html
786
- - doc/rdoc/files/lib/phusion_passenger/html_template_rb.html
787
- - doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html
788
- - doc/rdoc/files/lib/phusion_passenger/message_client_rb.html
789
- - doc/rdoc/files/lib/phusion_passenger/native_support_rb.html
790
- - doc/rdoc/files/lib/phusion_passenger/packaging_rb.html
791
- - doc/rdoc/files/lib/phusion_passenger/platform_info/apache_rb.html
792
- - doc/rdoc/files/lib/phusion_passenger/platform_info/binary_compatibility_rb.html
793
- - doc/rdoc/files/lib/phusion_passenger/platform_info/compiler_rb.html
794
- - doc/rdoc/files/lib/phusion_passenger/platform_info/curl_rb.html
795
- - doc/rdoc/files/lib/phusion_passenger/platform_info/documentation_tools_rb.html
796
- - doc/rdoc/files/lib/phusion_passenger/platform_info/linux_rb.html
797
- - doc/rdoc/files/lib/phusion_passenger/platform_info/operating_system_rb.html
798
- - doc/rdoc/files/lib/phusion_passenger/platform_info/ruby_rb.html
799
- - doc/rdoc/files/lib/phusion_passenger/platform_info/zlib_rb.html
800
- - doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html
801
- - doc/rdoc/files/lib/phusion_passenger/plugin_rb.html
802
- - doc/rdoc/files/lib/phusion_passenger/public_api_rb.html
803
- - doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html
804
- - doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html
805
- - doc/rdoc/files/lib/phusion_passenger/rails3_extensions/init_rb.html
806
- - doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html
807
- - doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html
808
- - doc/rdoc/files/lib/phusion_passenger/standalone/app_finder_rb.html
809
- - doc/rdoc/files/lib/phusion_passenger/standalone/command_rb.html
810
- - doc/rdoc/files/lib/phusion_passenger/standalone/config_file_rb.html
811
- - doc/rdoc/files/lib/phusion_passenger/standalone/help_command_rb.html
812
- - doc/rdoc/files/lib/phusion_passenger/standalone/main_rb.html
813
- - doc/rdoc/files/lib/phusion_passenger/standalone/package_runtime_command_rb.html
814
- - doc/rdoc/files/lib/phusion_passenger/standalone/runtime_installer_rb.html
815
- - doc/rdoc/files/lib/phusion_passenger/standalone/start_command_rb.html
816
- - doc/rdoc/files/lib/phusion_passenger/standalone/status_command_rb.html
817
- - doc/rdoc/files/lib/phusion_passenger/standalone/stop_command_rb.html
818
- - doc/rdoc/files/lib/phusion_passenger/standalone/utils_rb.html
819
- - doc/rdoc/files/lib/phusion_passenger/standalone/version_command_rb.html
820
- - doc/rdoc/files/lib/phusion_passenger/utils/file_system_watcher_rb.html
821
- - doc/rdoc/files/lib/phusion_passenger/utils/hosts_file_parser_rb.html
822
- - doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html
823
- - doc/rdoc/files/lib/phusion_passenger/utils/tmpdir_rb.html
824
- - doc/rdoc/files/lib/phusion_passenger/utils/unseekable_socket_rb.html
825
- - doc/rdoc/files/lib/phusion_passenger/utils_rb.html
826
- - doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html
827
- - doc/rdoc/files/README.html
828
- - doc/rdoc/fr_class_index.html
829
- - doc/rdoc/fr_file_index.html
830
- - doc/rdoc/fr_method_index.html
831
- - doc/rdoc/index.html
832
- - doc/rdoc/rdoc-style.css
833
658
  - doc/Security of user switching support.html
834
659
  - doc/Security of user switching support.txt
835
660
  - doc/template/horo.rb
@@ -873,8 +698,6 @@ files:
873
698
  - ext/common/AgentBase.cpp
874
699
  - ext/common/AgentsStarter.cpp
875
700
  - ext/common/BCrypt.cpp
876
- - ext/common/libboost_oxt/aggregate.cpp
877
- - ext/common/libpassenger_common/aggregate.cpp
878
701
  - ext/common/Logging.cpp
879
702
  - ext/common/LoggingAgent/FilterSupport.cpp
880
703
  - ext/common/LoggingAgent/Main.cpp
@@ -1,215 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html>
6
- <head>
7
- <title>Class: ConditionVariable</title>
8
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
10
-
11
- <script language="JavaScript" type="text/javascript">
12
- // <![CDATA[
13
-
14
- function toggleSource( id )
15
- {
16
- var elem
17
- var link
18
-
19
- if( document.getElementById )
20
- {
21
- elem = document.getElementById( id )
22
- link = document.getElementById( "l_" + id )
23
- }
24
- else if ( document.all )
25
- {
26
- elem = eval( "document.all." + id )
27
- link = eval( "document.all.l_" + id )
28
- }
29
- else
30
- return false;
31
-
32
- if( elem.style.display == "block" )
33
- {
34
- elem.style.display = "none"
35
- link.innerHTML = "show source"
36
- }
37
- else
38
- {
39
- elem.style.display = "block"
40
- link.innerHTML = "hide source"
41
- }
42
- }
43
-
44
- function openCode( url )
45
- {
46
- window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
47
- }
48
- // ]]>
49
- </script>
50
- </head>
51
-
52
- <body>
53
- <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
- <td class="file-title"><span class="file-title-prefix">Class</span><br />ConditionVariable</td>
55
- <td align="right">
56
- <table cellspacing="0" cellpadding="2">
57
- <tr valign="top">
58
- <td>In:</td>
59
- <td>
60
- <a href="../files/lib/phusion_passenger/utils_rb.html">lib/phusion_passenger/utils.rb</a>
61
- </td>
62
- </tr>
63
- <tr>
64
- <td>Parent:</td>
65
- <td>
66
- Object
67
- </td>
68
- </tr>
69
- </table>
70
- </td>
71
- </tr>
72
- </table>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
- <div id="content">
77
-
78
-
79
-
80
-
81
- <div class="sectiontitle">Methods</div>
82
- <ul>
83
- <li><a href="#M000003">timed_wait</a></li>
84
- <li><a href="#M000004">timed_wait!</a></li>
85
- </ul>
86
-
87
-
88
-
89
-
90
-
91
-
92
- <div class="sectiontitle">Public Instance methods</div>
93
- <div class="method">
94
- <div class="title">
95
- <a name="M000003"></a><b>timed_wait</b>(mutex, secs)
96
- </div>
97
- <div class="description">
98
- <p>
99
- This is like ConditionVariable.wait(), but allows one to wait a maximum
100
- amount of time. Returns true if this condition was signaled, false if a
101
- timeout occurred.
102
- </p>
103
- </div>
104
- <div class="sourcecode">
105
- <p class="source-link">[ <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show source</a> ]</p>
106
- <div id="M000003_source" class="dyn-source">
107
- <pre>
108
- <span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 882</span>
109
- 882: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timed_wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
110
- 883: <span class="ruby-identifier">ruby_engine</span> = <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;ruby&quot;</span>
111
- 884: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">100000000</span>
112
- 885: <span class="ruby-comment cmt"># NOTE: If one calls timeout() on FreeBSD 5 with an</span>
113
- 886: <span class="ruby-comment cmt"># argument of more than 100000000, then MRI will become</span>
114
- 887: <span class="ruby-comment cmt"># stuck in an infite loop, blocking all threads. It seems</span>
115
- 888: <span class="ruby-comment cmt"># that MRI uses select() to implement sleeping.</span>
116
- 889: <span class="ruby-comment cmt"># I think that a value of more than 100000000 overflows</span>
117
- 890: <span class="ruby-comment cmt"># select()'s data structures, causing it to behave incorrectly.</span>
118
- 891: <span class="ruby-comment cmt"># So we just make sure we can't sleep more than 100000000</span>
119
- 892: <span class="ruby-comment cmt"># seconds.</span>
120
- 893: <span class="ruby-identifier">secs</span> = <span class="ruby-value">100000000</span>
121
- 894: <span class="ruby-keyword kw">end</span>
122
- 895: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ruby_engine</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;jruby&quot;</span>
123
- 896: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
124
- 897: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
125
- 898: <span class="ruby-keyword kw">else</span>
126
- 899: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
127
- 900: <span class="ruby-keyword kw">end</span>
128
- 901: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value str">'1.9.2'</span>
129
- 902: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
130
- 903: <span class="ruby-identifier">t1</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
131
- 904: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
132
- 905: <span class="ruby-identifier">t2</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
133
- 906: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">t1</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">secs</span>
134
- 907: <span class="ruby-keyword kw">else</span>
135
- 908: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
136
- 909: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
137
- 910: <span class="ruby-keyword kw">end</span>
138
- 911: <span class="ruby-keyword kw">else</span>
139
- 912: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
140
- 913: <span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-identifier">secs</span>) <span class="ruby-keyword kw">do</span>
141
- 914: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
142
- 915: <span class="ruby-keyword kw">end</span>
143
- 916: <span class="ruby-keyword kw">else</span>
144
- 917: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
145
- 918: <span class="ruby-keyword kw">end</span>
146
- 919: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
147
- 920: <span class="ruby-keyword kw">end</span>
148
- 921: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>
149
- 922: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
150
- 923: <span class="ruby-keyword kw">end</span>
151
- </pre>
152
- </div>
153
- </div>
154
- </div>
155
- <div class="method">
156
- <div class="title">
157
- <a name="M000004"></a><b>timed_wait!</b>(mutex, secs)
158
- </div>
159
- <div class="description">
160
- <p>
161
- This is like ConditionVariable.wait(), but allows one to wait a maximum
162
- amount of time. Raises Timeout::Error if the timeout has elapsed.
163
- </p>
164
- </div>
165
- <div class="sourcecode">
166
- <p class="source-link">[ <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show source</a> ]</p>
167
- <div id="M000004_source" class="dyn-source">
168
- <pre>
169
- <span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 927</span>
170
- 927: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timed_wait!</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
171
- 928: <span class="ruby-identifier">ruby_engine</span> = <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;ruby&quot;</span>
172
- 929: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">100000000</span>
173
- 930: <span class="ruby-comment cmt"># See the corresponding note for timed_wait().</span>
174
- 931: <span class="ruby-identifier">secs</span> = <span class="ruby-value">100000000</span>
175
- 932: <span class="ruby-keyword kw">end</span>
176
- 933: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ruby_engine</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;jruby&quot;</span>
177
- 934: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
178
- 935: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
179
- 936: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>, <span class="ruby-value str">&quot;Timeout&quot;</span>
180
- 937: <span class="ruby-keyword kw">end</span>
181
- 938: <span class="ruby-keyword kw">else</span>
182
- 939: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
183
- 940: <span class="ruby-keyword kw">end</span>
184
- 941: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value str">'1.9.2'</span>
185
- 942: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
186
- 943: <span class="ruby-identifier">t1</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
187
- 944: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
188
- 945: <span class="ruby-identifier">t2</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
189
- 946: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">t1</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-identifier">secs</span>
190
- 947: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>, <span class="ruby-value str">&quot;Timeout&quot;</span>
191
- 948: <span class="ruby-keyword kw">end</span>
192
- 949: <span class="ruby-keyword kw">else</span>
193
- 950: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
194
- 951: <span class="ruby-keyword kw">end</span>
195
- 952: <span class="ruby-keyword kw">else</span>
196
- 953: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
197
- 954: <span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-identifier">secs</span>) <span class="ruby-keyword kw">do</span>
198
- 955: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
199
- 956: <span class="ruby-keyword kw">end</span>
200
- 957: <span class="ruby-keyword kw">else</span>
201
- 958: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
202
- 959: <span class="ruby-keyword kw">end</span>
203
- 960: <span class="ruby-keyword kw">end</span>
204
- 961: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
205
- 962: <span class="ruby-keyword kw">end</span>
206
- </pre>
207
- </div>
208
- </div>
209
- </div>
210
- </div>
211
-
212
- </div>
213
-
214
- </body>
215
- </html>