passenger 3.0.2 → 3.0.3

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 (220) hide show
  1. data/NEWS +29 -0
  2. data/build/agents.rb +1 -0
  3. data/build/apache2.rb +2 -1
  4. data/build/cxx_tests.rb +7 -0
  5. data/build/rpm.rb +17 -22
  6. data/doc/cxxapi/Constants_8h_source.html +1 -1
  7. data/doc/cxxapi/Exceptions_8h_source.html +18 -4
  8. data/doc/cxxapi/Logging_8h_source.html +332 -262
  9. data/doc/cxxapi/annotated.html +1 -0
  10. data/doc/cxxapi/classes.html +4 -4
  11. data/doc/cxxapi/group__Exceptions.html +2 -0
  12. data/doc/cxxapi/hierarchy.html +1 -0
  13. data/doc/cxxapi/inherit__graph__35.map +1 -3
  14. data/doc/cxxapi/inherit__graph__35.md5 +1 -1
  15. data/doc/cxxapi/inherit__graph__35.png +0 -0
  16. data/doc/cxxapi/inherit__graph__36.map +3 -1
  17. data/doc/cxxapi/inherit__graph__36.md5 +1 -1
  18. data/doc/cxxapi/inherit__graph__36.png +0 -0
  19. data/doc/cxxapi/inherit__graph__37.map +1 -1
  20. data/doc/cxxapi/inherit__graph__37.md5 +1 -1
  21. data/doc/cxxapi/inherit__graph__37.png +0 -0
  22. data/doc/cxxapi/inherit__graph__38.map +1 -1
  23. data/doc/cxxapi/inherit__graph__38.md5 +1 -1
  24. data/doc/cxxapi/inherit__graph__38.png +0 -0
  25. data/doc/cxxapi/inherit__graph__39.map +1 -1
  26. data/doc/cxxapi/inherit__graph__39.md5 +1 -1
  27. data/doc/cxxapi/inherit__graph__39.png +0 -0
  28. data/doc/cxxapi/inherit__graph__40.map +1 -1
  29. data/doc/cxxapi/inherit__graph__40.md5 +1 -1
  30. data/doc/cxxapi/inherit__graph__40.png +0 -0
  31. data/doc/cxxapi/inherits.html +9 -6
  32. data/doc/cxxapi/namespacePassenger.html +2 -0
  33. data/doc/cxxapi/tree.html +2 -0
  34. data/doc/rdoc/classes/ConditionVariable.html +215 -0
  35. data/doc/rdoc/classes/Exception.html +120 -0
  36. data/doc/rdoc/classes/GC.html +113 -0
  37. data/doc/rdoc/classes/IO.html +221 -0
  38. data/doc/rdoc/classes/PhusionPassenger.html +397 -0
  39. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +180 -0
  40. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +647 -0
  41. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +654 -0
  42. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/InvalidPassword.html +92 -0
  43. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +97 -0
  44. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +96 -0
  45. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +97 -0
  46. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +96 -0
  47. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +619 -0
  48. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +142 -0
  49. data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats.html +368 -0
  50. data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats/Process.html +231 -0
  51. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance.html +588 -0
  52. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/CorruptedDirectoryError.html +92 -0
  53. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/GenerationsAbsentError.html +92 -0
  54. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Group.html +147 -0
  55. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Process.html +279 -0
  56. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/RoleDeniedError.html +92 -0
  57. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/StaleDirectoryError.html +92 -0
  58. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Stats.html +123 -0
  59. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/UnsupportedGenerationStructureVersionError.html +92 -0
  60. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger.html +368 -0
  61. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Log.html +299 -0
  62. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/SharedData.html +206 -0
  63. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +155 -0
  64. data/doc/rdoc/classes/PhusionPassenger/AppProcess.html +367 -0
  65. data/doc/rdoc/classes/PhusionPassenger/ClassicRails.html +95 -0
  66. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner.html +351 -0
  67. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner/Error.html +98 -0
  68. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/CGIFixed.html +200 -0
  69. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner.html +410 -0
  70. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner/Error.html +98 -0
  71. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/RequestHandler.html +156 -0
  72. data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions.html +115 -0
  73. data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions/AnalyticsLogging.html +202 -0
  74. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +172 -0
  75. data/doc/rdoc/classes/PhusionPassenger/DebugLogging.html +273 -0
  76. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +145 -0
  77. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +162 -0
  78. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +141 -0
  79. data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
  80. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +673 -0
  81. data/doc/rdoc/classes/PhusionPassenger/MessageChannel/InvalidHashError.html +92 -0
  82. data/doc/rdoc/classes/PhusionPassenger/MessageClient.html +415 -0
  83. data/doc/rdoc/classes/PhusionPassenger/NativeSupportLoader.html +134 -0
  84. data/doc/rdoc/classes/PhusionPassenger/Packaging.html +129 -0
  85. data/doc/rdoc/classes/PhusionPassenger/PlatformInfo.html +1972 -0
  86. data/doc/rdoc/classes/PhusionPassenger/Plugin.html +237 -0
  87. data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
  88. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +312 -0
  89. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner/Error.html +98 -0
  90. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +218 -0
  91. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions.html +114 -0
  92. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging.html +259 -0
  93. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ACExtension.html +139 -0
  94. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ASBenchmarkableExtension.html +118 -0
  95. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ExceptionLogger.html +135 -0
  96. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +378 -0
  97. data/doc/rdoc/classes/PhusionPassenger/Standalone.html +111 -0
  98. data/doc/rdoc/classes/PhusionPassenger/Standalone/AppFinder.html +252 -0
  99. data/doc/rdoc/classes/PhusionPassenger/Standalone/Command.html +161 -0
  100. data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile.html +368 -0
  101. data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile/DisallowedContextError.html +132 -0
  102. data/doc/rdoc/classes/PhusionPassenger/Standalone/HelpCommand.html +151 -0
  103. data/doc/rdoc/classes/PhusionPassenger/Standalone/Main.html +189 -0
  104. data/doc/rdoc/classes/PhusionPassenger/Standalone/PackageRuntimeCommand.html +177 -0
  105. data/doc/rdoc/classes/PhusionPassenger/Standalone/RuntimeInstaller.html +341 -0
  106. data/doc/rdoc/classes/PhusionPassenger/Standalone/StartCommand.html +203 -0
  107. data/doc/rdoc/classes/PhusionPassenger/Standalone/StatusCommand.html +156 -0
  108. data/doc/rdoc/classes/PhusionPassenger/Standalone/StopCommand.html +168 -0
  109. data/doc/rdoc/classes/PhusionPassenger/Standalone/Utils.html +86 -0
  110. data/doc/rdoc/classes/PhusionPassenger/Standalone/VersionCommand.html +135 -0
  111. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +125 -0
  112. data/doc/rdoc/classes/PhusionPassenger/Utils.html +1543 -0
  113. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher.html +204 -0
  114. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/DirInfo.html +171 -0
  115. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/FileInfo.html +140 -0
  116. data/doc/rdoc/classes/PhusionPassenger/Utils/HostsFileParser.html +260 -0
  117. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +194 -0
  118. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +265 -0
  119. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +120 -0
  120. data/doc/rdoc/classes/PhusionPassenger/Utils/UnseekableSocket.html +561 -0
  121. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +140 -0
  122. data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
  123. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +182 -0
  124. data/doc/rdoc/classes/Process.html +115 -0
  125. data/doc/rdoc/classes/Signal.html +139 -0
  126. data/doc/rdoc/created.rid +1 -0
  127. data/doc/rdoc/files/DEVELOPERS_TXT.html +280 -0
  128. data/doc/rdoc/files/README.html +157 -0
  129. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +130 -0
  130. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +135 -0
  131. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +126 -0
  132. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +128 -0
  133. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/memory_stats_rb.html +126 -0
  134. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/server_instance_rb.html +132 -0
  135. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +122 -0
  136. data/doc/rdoc/files/lib/phusion_passenger/analytics_logger_rb.html +129 -0
  137. data/doc/rdoc/files/lib/phusion_passenger/app_process_rb.html +127 -0
  138. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/application_spawner_rb.html +141 -0
  139. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/cgi_fixed_rb.html +126 -0
  140. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/framework_spawner_rb.html +146 -0
  141. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/request_handler_rb.html +125 -0
  142. data/doc/rdoc/files/lib/phusion_passenger/classic_rails_extensions/init_rb.html +132 -0
  143. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +126 -0
  144. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +122 -0
  145. data/doc/rdoc/files/lib/phusion_passenger/debug_logging_rb.html +122 -0
  146. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +147 -0
  147. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +122 -0
  148. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +127 -0
  149. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +120 -0
  150. data/doc/rdoc/files/lib/phusion_passenger/message_client_rb.html +127 -0
  151. data/doc/rdoc/files/lib/phusion_passenger/native_support_rb.html +132 -0
  152. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
  153. data/doc/rdoc/files/lib/phusion_passenger/platform_info/apache_rb.html +127 -0
  154. data/doc/rdoc/files/lib/phusion_passenger/platform_info/binary_compatibility_rb.html +129 -0
  155. data/doc/rdoc/files/lib/phusion_passenger/platform_info/compiler_rb.html +127 -0
  156. data/doc/rdoc/files/lib/phusion_passenger/platform_info/curl_rb.html +126 -0
  157. data/doc/rdoc/files/lib/phusion_passenger/platform_info/documentation_tools_rb.html +126 -0
  158. data/doc/rdoc/files/lib/phusion_passenger/platform_info/linux_rb.html +126 -0
  159. data/doc/rdoc/files/lib/phusion_passenger/platform_info/operating_system_rb.html +127 -0
  160. data/doc/rdoc/files/lib/phusion_passenger/platform_info/ruby_rb.html +128 -0
  161. data/doc/rdoc/files/lib/phusion_passenger/platform_info/zlib_rb.html +126 -0
  162. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +122 -0
  163. data/doc/rdoc/files/lib/phusion_passenger/plugin_rb.html +127 -0
  164. data/doc/rdoc/files/lib/phusion_passenger/public_api_rb.html +127 -0
  165. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +137 -0
  166. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +125 -0
  167. data/doc/rdoc/files/lib/phusion_passenger/rails3_extensions/init_rb.html +127 -0
  168. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +122 -0
  169. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +160 -0
  170. data/doc/rdoc/files/lib/phusion_passenger/standalone/app_finder_rb.html +127 -0
  171. data/doc/rdoc/files/lib/phusion_passenger/standalone/command_rb.html +136 -0
  172. data/doc/rdoc/files/lib/phusion_passenger/standalone/config_file_rb.html +126 -0
  173. data/doc/rdoc/files/lib/phusion_passenger/standalone/help_command_rb.html +126 -0
  174. data/doc/rdoc/files/lib/phusion_passenger/standalone/main_rb.html +126 -0
  175. data/doc/rdoc/files/lib/phusion_passenger/standalone/package_runtime_command_rb.html +127 -0
  176. data/doc/rdoc/files/lib/phusion_passenger/standalone/runtime_installer_rb.html +133 -0
  177. data/doc/rdoc/files/lib/phusion_passenger/standalone/start_command_rb.html +136 -0
  178. data/doc/rdoc/files/lib/phusion_passenger/standalone/status_command_rb.html +126 -0
  179. data/doc/rdoc/files/lib/phusion_passenger/standalone/stop_command_rb.html +126 -0
  180. data/doc/rdoc/files/lib/phusion_passenger/standalone/utils_rb.html +126 -0
  181. data/doc/rdoc/files/lib/phusion_passenger/standalone/version_command_rb.html +127 -0
  182. data/doc/rdoc/files/lib/phusion_passenger/utils/file_system_watcher_rb.html +126 -0
  183. data/doc/rdoc/files/lib/phusion_passenger/utils/hosts_file_parser_rb.html +120 -0
  184. data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +100 -0
  185. data/doc/rdoc/files/lib/phusion_passenger/utils/tmpdir_rb.html +122 -0
  186. data/doc/rdoc/files/lib/phusion_passenger/utils/unseekable_socket_rb.html +126 -0
  187. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +179 -0
  188. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +132 -0
  189. data/doc/rdoc/fr_class_index.html +139 -0
  190. data/doc/rdoc/fr_file_index.html +108 -0
  191. data/doc/rdoc/fr_method_index.html +439 -0
  192. data/doc/rdoc/index.html +26 -0
  193. data/doc/rdoc/rdoc-style.css +187 -0
  194. data/ext/apache2/Configuration.cpp +41 -0
  195. data/ext/apache2/Configuration.hpp +19 -0
  196. data/ext/apache2/Hooks.cpp +67 -5
  197. data/ext/common/Constants.h +1 -1
  198. data/ext/common/Exceptions.h +14 -0
  199. data/ext/common/Logging.h +76 -6
  200. data/ext/common/LoggingAgent/FilterSupport.h +1317 -0
  201. data/ext/common/LoggingAgent/LoggingServer.h +93 -4
  202. data/ext/common/LoggingAgent/RemoteSender.h +5 -5
  203. data/ext/common/Utils/StrIntUtils.cpp +12 -1
  204. data/ext/common/Utils/StrIntUtils.h +2 -1
  205. data/ext/common/Utils/StringMap.h +100 -0
  206. data/ext/nginx/Configuration.c +0 -1
  207. data/ext/nginx/ContentHandler.c +33 -7
  208. data/lib/phusion_passenger.rb +2 -2
  209. data/lib/phusion_passenger/abstract_request_handler.rb +5 -0
  210. data/lib/phusion_passenger/analytics_logger.rb +77 -11
  211. data/lib/phusion_passenger/dependencies.rb +11 -1
  212. data/lib/phusion_passenger/platform_info.rb +1 -1
  213. data/lib/phusion_passenger/utils.rb +9 -1
  214. data/test/cxx/FilterSupportTest.cpp +276 -0
  215. data/test/cxx/LoggingTest.cpp +28 -0
  216. data/test/cxx/StringMapTest.cpp +70 -0
  217. data/test/integration_tests/cgi_environment_spec.rb +10 -0
  218. metadata +170 -8
  219. data/ext/common/libboost_oxt/aggregate.cpp +0 -10
  220. data/ext/common/libpassenger_common/aggregate.cpp +0 -15
@@ -0,0 +1,95 @@
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>Module: PhusionPassenger::ClassicRails</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">Module</span><br />PhusionPassenger::ClassicRails</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/classic_rails/application_spawner_rb.html">lib/phusion_passenger/classic_rails/application_spawner.rb</a>
61
+ <a href="../../files/lib/phusion_passenger/classic_rails/cgi_fixed_rb.html">lib/phusion_passenger/classic_rails/cgi_fixed.rb</a>
62
+ <a href="../../files/lib/phusion_passenger/classic_rails/framework_spawner_rb.html">lib/phusion_passenger/classic_rails/framework_spawner.rb</a>
63
+ <a href="../../files/lib/phusion_passenger/classic_rails/request_handler_rb.html">lib/phusion_passenger/classic_rails/request_handler.rb</a>
64
+ </td>
65
+ </tr>
66
+ </table>
67
+ </td>
68
+ </tr>
69
+ </table>
70
+ <!-- banner header -->
71
+
72
+ <div id="bodyContent">
73
+ <div id="content">
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <div class="sectiontitle">Classes and Modules</div>
82
+ Class <a href="ClassicRails/ApplicationSpawner.html" class="link">PhusionPassenger::ClassicRails::ApplicationSpawner</a><br />
83
+ Class <a href="ClassicRails/CGIFixed.html" class="link">PhusionPassenger::ClassicRails::CGIFixed</a><br />
84
+ Class <a href="ClassicRails/FrameworkSpawner.html" class="link">PhusionPassenger::ClassicRails::FrameworkSpawner</a><br />
85
+ Class <a href="ClassicRails/RequestHandler.html" class="link">PhusionPassenger::ClassicRails::RequestHandler</a><br />
86
+
87
+
88
+
89
+
90
+ </div>
91
+
92
+ </div>
93
+
94
+ </body>
95
+ </html>
@@ -0,0 +1,351 @@
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: PhusionPassenger::ClassicRails::ApplicationSpawner</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 />PhusionPassenger::ClassicRails::ApplicationSpawner</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/classic_rails/application_spawner_rb.html">lib/phusion_passenger/classic_rails/application_spawner.rb</a>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>Parent:</td>
65
+ <td>
66
+ AbstractServer
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
+ <div class="description"><p>
79
+ Spawning of Rails 1 and Rails 2 applications.
80
+ </p>
81
+ <p>
82
+ <a href="ApplicationSpawner.html">ClassicRails::ApplicationSpawner</a> can
83
+ operate in two modes:
84
+ </p>
85
+ <ul>
86
+ <li>Smart mode. In this mode, the Rails application&#8216;s code is first
87
+ preloaded into a temporary process, which can then further fork off
88
+ application processes. Once the code has been preloaded, forking off
89
+ application processes is very fast, and all the forked off application
90
+ processes can share code memory with each other. To use this mode, create
91
+ an <a href="ApplicationSpawner.html">ApplicationSpawner</a> object, <a
92
+ href="ApplicationSpawner.html#M000195">start</a> it, and call <a
93
+ href="ApplicationSpawner.html#M000192">#spawn_application</a> on it. A
94
+ single <a href="ApplicationSpawner.html">ApplicationSpawner</a> object can
95
+ only handle a single Rails application.
96
+
97
+ </li>
98
+ <li>Conservative mode. In this mode, a Rails app process is directly spawned
99
+ without any preloading. This increases compatibility with applications. To
100
+ use this mode, call <a
101
+ href="ApplicationSpawner.html#M000192">ApplicationSpawner.spawn_application</a>.
102
+
103
+ </li>
104
+ </ul>
105
+ </div>
106
+
107
+
108
+
109
+ <div class="sectiontitle">Methods</div>
110
+ <ul>
111
+ <li><a href="#M000193">new</a></li>
112
+ <li><a href="#M000192">spawn_application</a></li>
113
+ <li><a href="#M000194">spawn_application</a></li>
114
+ <li><a href="#M000195">start</a></li>
115
+ </ul>
116
+
117
+ <div class="sectiontitle">Included Modules</div>
118
+ <ul>
119
+ <li><a href="../Utils.html">Utils</a></li>
120
+ <li><a href="../DebugLogging.html">DebugLogging</a></li>
121
+ </ul>
122
+
123
+
124
+ <div class="sectiontitle">Classes and Modules</div>
125
+ Class <a href="ApplicationSpawner/Error.html" class="link">PhusionPassenger::ClassicRails::ApplicationSpawner::Error</a><br />
126
+
127
+
128
+
129
+ <div class="sectiontitle">Attributes</div>
130
+ <table border='0' cellpadding='5'>
131
+ <tr valign='top'>
132
+ <td class='attr-rw'>
133
+ [R]
134
+ </td>
135
+ <td class='attr-name'>app_root</td>
136
+ <td class='attr-desc'>
137
+ The application root of this spawner.
138
+
139
+ </td>
140
+ </tr>
141
+ </table>
142
+
143
+ <div class="sectiontitle">Public Class methods</div>
144
+ <div class="method">
145
+ <div class="title">
146
+ <a name="M000193"></a><b>new</b>(options)
147
+ </div>
148
+ <div class="description">
149
+ <p>
150
+ The following options are accepted:
151
+ </p>
152
+ <ul>
153
+ <li>&#8216;app_root&#8216;
154
+
155
+ </li>
156
+ </ul>
157
+ <p>
158
+ See <a
159
+ href="../SpawnManager.html#M000372">SpawnManager#spawn_application</a> for
160
+ information about the options.
161
+ </p>
162
+ </div>
163
+ <div class="sourcecode">
164
+ <p class="source-link">[ <a href="javascript:toggleSource('M000193_source')" id="l_M000193_source">show source</a> ]</p>
165
+ <div id="M000193_source" class="dyn-source">
166
+ <pre>
167
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/classic_rails/application_spawner.rb, line 116</span>
168
+ 116: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
169
+ 117: <span class="ruby-keyword kw">super</span>()
170
+ 118: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">sanitize_spawn_options</span>(<span class="ruby-identifier">options</span>)
171
+ 119: <span class="ruby-ivar">@app_root</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;app_root&quot;</span>]
172
+ 120: <span class="ruby-ivar">@canonicalized_app_root</span> = <span class="ruby-identifier">canonicalize_path</span>(<span class="ruby-ivar">@app_root</span>)
173
+ 121: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">max_idle_time</span> = <span class="ruby-constant">DEFAULT_APP_SPAWNER_MAX_IDLE_TIME</span>
174
+ 122: <span class="ruby-identifier">define_message_handler</span>(<span class="ruby-identifier">:spawn_application</span>, <span class="ruby-identifier">:handle_spawn_application</span>)
175
+ 123: <span class="ruby-keyword kw">end</span>
176
+ </pre>
177
+ </div>
178
+ </div>
179
+ </div>
180
+ <div class="method">
181
+ <div class="title">
182
+ <a name="M000192"></a><b>spawn_application</b>(options)
183
+ </div>
184
+ <div class="description">
185
+ <p>
186
+ Spawns an instance of a Rails application. When successful, an <a
187
+ href="../AppProcess.html">AppProcess</a> object will be returned, which
188
+ represents the spawned Rails application.
189
+ </p>
190
+ <p>
191
+ This method spawns the application directly, without preloading its code.
192
+ This method may only be called if no Rails framework has been loaded in the
193
+ current Ruby VM.
194
+ </p>
195
+ <p>
196
+ The &quot;app_root&quot; option must be given. All other options are passed
197
+ to the request handler&#8216;s constructor.
198
+ </p>
199
+ <p>
200
+ Raises:
201
+ </p>
202
+ <ul>
203
+ <li><a href="../AppInitError.html">AppInitError</a>: The Ruby on Rails
204
+ application raised an exception or called exit() during startup.
205
+
206
+ </li>
207
+ <li>SystemCallError, IOError, SocketError: Something went wrong.
208
+
209
+ </li>
210
+ </ul>
211
+ </div>
212
+ <div class="sourcecode">
213
+ <p class="source-link">[ <a href="javascript:toggleSource('M000192_source')" id="l_M000192_source">show source</a> ]</p>
214
+ <div id="M000192_source" class="dyn-source">
215
+ <pre>
216
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/classic_rails/application_spawner.rb, line 80</span>
217
+ 80: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">spawn_application</span>(<span class="ruby-identifier">options</span>)
218
+ 81: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">sanitize_spawn_options</span>(<span class="ruby-identifier">options</span>)
219
+ 82:
220
+ 83: <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span> = <span class="ruby-constant">UNIXSocket</span>.<span class="ruby-identifier">pair</span>
221
+ 84: <span class="ruby-identifier">pid</span> = <span class="ruby-identifier">safe_fork</span>(<span class="ruby-value str">'application'</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">do</span>
222
+ 85: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">close</span>
223
+ 86:
224
+ 87: <span class="ruby-identifier">file_descriptors_to_leave_open</span> = [<span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">fileno</span>]
225
+ 88: <span class="ruby-constant">NativeSupport</span>.<span class="ruby-identifier">close_all_file_descriptors</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
226
+ 89: <span class="ruby-identifier">close_all_io_objects_for_fds</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
227
+ 90:
228
+ 91: <span class="ruby-identifier">channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">b</span>)
229
+ 92: <span class="ruby-identifier">success</span> = <span class="ruby-identifier">report_app_init_status</span>(<span class="ruby-identifier">channel</span>) <span class="ruby-keyword kw">do</span>
230
+ 93: <span class="ruby-identifier">prepare_app_process</span>(<span class="ruby-value str">'config/environment.rb'</span>, <span class="ruby-identifier">options</span>)
231
+ 94: <span class="ruby-identifier">require</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">'config/environment'</span>)
232
+ 95: <span class="ruby-identifier">require</span> <span class="ruby-value str">'dispatcher'</span>
233
+ 96: <span class="ruby-identifier">after_loading_app_code</span>(<span class="ruby-identifier">options</span>)
234
+ 97: <span class="ruby-keyword kw">end</span>
235
+ 98: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">success</span>
236
+ 99: <span class="ruby-identifier">start_request_handler</span>(<span class="ruby-identifier">channel</span>, <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">options</span>)
237
+ 100: <span class="ruby-keyword kw">end</span>
238
+ 101: <span class="ruby-keyword kw">end</span>
239
+ 102: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">close</span>
240
+ 103: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">waitpid</span>(<span class="ruby-identifier">pid</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
241
+ 104:
242
+ 105: <span class="ruby-identifier">channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">a</span>)
243
+ 106: <span class="ruby-identifier">unmarshal_and_raise_errors</span>(<span class="ruby-identifier">channel</span>, <span class="ruby-identifier">options</span>[<span class="ruby-value str">&quot;print_exceptions&quot;</span>])
244
+ 107:
245
+ 108: <span class="ruby-comment cmt"># No exception was raised, so spawning succeeded.</span>
246
+ 109: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">AppProcess</span>.<span class="ruby-identifier">read_from_channel</span>(<span class="ruby-identifier">channel</span>)
247
+ 110: <span class="ruby-keyword kw">end</span>
248
+ </pre>
249
+ </div>
250
+ </div>
251
+ </div>
252
+ <div class="sectiontitle">Public Instance methods</div>
253
+ <div class="method">
254
+ <div class="title">
255
+ <a name="M000194"></a><b>spawn_application</b>(options = {})
256
+ </div>
257
+ <div class="description">
258
+ <p>
259
+ Spawns an instance of the Rails application. When successful, an <a
260
+ href="../AppProcess.html">AppProcess</a> object will be returned, which
261
+ represents the spawned Rails application.
262
+ </p>
263
+ <p>
264
+ <tt>options</tt> will be passed to the request handler&#8216;s constructor.
265
+ </p>
266
+ <p>
267
+ Raises:
268
+ </p>
269
+ <ul>
270
+ <li><a
271
+ href="../AbstractServer/ServerNotStarted.html">AbstractServer::ServerNotStarted</a>:
272
+ The <a href="ApplicationSpawner.html">ApplicationSpawner</a> server
273
+ hasn&#8216;t already been started.
274
+
275
+ </li>
276
+ <li><a href="ApplicationSpawner/Error.html">ApplicationSpawner::Error</a>: The
277
+ <a href="ApplicationSpawner.html">ApplicationSpawner</a> server exited
278
+ unexpectedly.
279
+
280
+ </li>
281
+ </ul>
282
+ </div>
283
+ <div class="sourcecode">
284
+ <p class="source-link">[ <a href="javascript:toggleSource('M000194_source')" id="l_M000194_source">show source</a> ]</p>
285
+ <div id="M000194_source" class="dyn-source">
286
+ <pre>
287
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/classic_rails/application_spawner.rb, line 133</span>
288
+ 133: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application</span>(<span class="ruby-identifier">options</span> = {})
289
+ 134: <span class="ruby-identifier">connect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span>
290
+ 135: <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">&quot;spawn_application&quot;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">options</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">flatten</span>)
291
+ 136: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">AppProcess</span>.<span class="ruby-identifier">read_from_channel</span>(<span class="ruby-identifier">channel</span>)
292
+ 137: <span class="ruby-keyword kw">end</span>
293
+ 138: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SystemCallError</span>, <span class="ruby-constant">IOError</span>, <span class="ruby-constant">SocketError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
294
+ 139: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-node">&quot;The application spawner server exited unexpectedly: #{e}&quot;</span>
295
+ 140: <span class="ruby-keyword kw">end</span>
296
+ </pre>
297
+ </div>
298
+ </div>
299
+ </div>
300
+ <div class="method">
301
+ <div class="title">
302
+ <a name="M000195"></a><b>start</b>()
303
+ </div>
304
+ <div class="description">
305
+ <p>
306
+ Overrided from <a
307
+ href="../AbstractServer.html#M000334">AbstractServer#start</a>.
308
+ </p>
309
+ <p>
310
+ May raise these additional exceptions:
311
+ </p>
312
+ <ul>
313
+ <li><a href="../AppInitError.html">AppInitError</a>: The Ruby on Rails
314
+ application raised an exception or called exit() during startup.
315
+
316
+ </li>
317
+ <li><a href="ApplicationSpawner/Error.html">ApplicationSpawner::Error</a>: The
318
+ <a href="ApplicationSpawner.html">ApplicationSpawner</a> server exited
319
+ unexpectedly.
320
+
321
+ </li>
322
+ </ul>
323
+ </div>
324
+ <div class="sourcecode">
325
+ <p class="source-link">[ <a href="javascript:toggleSource('M000195_source')" id="l_M000195_source">show source</a> ]</p>
326
+ <div id="M000195_source" class="dyn-source">
327
+ <pre>
328
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/classic_rails/application_spawner.rb, line 148</span>
329
+ 148: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
330
+ 149: <span class="ruby-keyword kw">super</span>
331
+ 150: <span class="ruby-keyword kw">begin</span>
332
+ 151: <span class="ruby-identifier">channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@owner_socket</span>)
333
+ 152: <span class="ruby-identifier">unmarshal_and_raise_errors</span>(<span class="ruby-identifier">channel</span>, <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;print_exceptions&quot;</span>])
334
+ 153: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">IOError</span>, <span class="ruby-constant">SystemCallError</span>, <span class="ruby-constant">SocketError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
335
+ 154: <span class="ruby-identifier">stop</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">started?</span>
336
+ 155: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-node">&quot;The application spawner server exited unexpectedly: #{e}&quot;</span>
337
+ 156: <span class="ruby-keyword kw">rescue</span>
338
+ 157: <span class="ruby-identifier">stop</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">started?</span>
339
+ 158: <span class="ruby-identifier">raise</span>
340
+ 159: <span class="ruby-keyword kw">end</span>
341
+ 160: <span class="ruby-keyword kw">end</span>
342
+ </pre>
343
+ </div>
344
+ </div>
345
+ </div>
346
+ </div>
347
+
348
+ </div>
349
+
350
+ </body>
351
+ </html>
@@ -0,0 +1,98 @@
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: PhusionPassenger::ClassicRails::ApplicationSpawner::Error</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 />PhusionPassenger::ClassicRails::ApplicationSpawner::Error</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/classic_rails/application_spawner_rb.html">lib/phusion_passenger/classic_rails/application_spawner.rb</a>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>Parent:</td>
65
+ <td>
66
+ AbstractServer::ServerError
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
+ <div class="description"><p>
79
+ This exception means that the <a
80
+ href="../ApplicationSpawner.html">ApplicationSpawner</a> server process
81
+ exited unexpectedly.
82
+ </p>
83
+ </div>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+ </div>
94
+
95
+ </div>
96
+
97
+ </body>
98
+ </html>