passenger 3.0.0.pre1 → 3.0.0.pre2

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 (189) hide show
  1. data/DEVELOPERS.TXT +2 -2
  2. data/NEWS +2 -2
  3. data/Rakefile +1 -1
  4. data/build/packaging.rb +1 -1
  5. data/doc/Users guide Apache.html +22 -22
  6. data/doc/Users guide Apache.txt +2 -2
  7. data/doc/Users guide Nginx.html +14 -14
  8. data/doc/Users guide Nginx.txt +3 -2
  9. data/doc/Users guide Standalone.html +1 -1
  10. data/doc/cxxapi/Constants_8h_source.html +1 -1
  11. data/doc/cxxapi/ResourceLocator_8h_source.html +1 -1
  12. data/doc/rdoc/classes/ConditionVariable.html +215 -0
  13. data/doc/rdoc/classes/Exception.html +120 -0
  14. data/doc/rdoc/classes/GC.html +113 -0
  15. data/doc/rdoc/classes/IO.html +221 -0
  16. data/doc/rdoc/classes/PhusionPassenger.html +368 -0
  17. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +180 -0
  18. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +647 -0
  19. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +654 -0
  20. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/InvalidPassword.html +92 -0
  21. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +97 -0
  22. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +96 -0
  23. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +97 -0
  24. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +96 -0
  25. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +619 -0
  26. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +142 -0
  27. data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats.html +368 -0
  28. data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats/Process.html +231 -0
  29. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance.html +588 -0
  30. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/CorruptedDirectoryError.html +92 -0
  31. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/GenerationsAbsentError.html +92 -0
  32. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Group.html +147 -0
  33. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Process.html +279 -0
  34. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/RoleDeniedError.html +92 -0
  35. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/StaleDirectoryError.html +92 -0
  36. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Stats.html +123 -0
  37. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/UnsupportedGenerationStructureVersionError.html +92 -0
  38. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger.html +341 -0
  39. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Log.html +294 -0
  40. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/SharedData.html +199 -0
  41. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +155 -0
  42. data/doc/rdoc/classes/PhusionPassenger/AppProcess.html +367 -0
  43. data/doc/rdoc/classes/PhusionPassenger/ClassicRails.html +95 -0
  44. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner.html +351 -0
  45. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner/Error.html +98 -0
  46. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/CGIFixed.html +200 -0
  47. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner.html +410 -0
  48. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner/Error.html +98 -0
  49. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/RequestHandler.html +156 -0
  50. data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions.html +115 -0
  51. data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions/AnalyticsLogging.html +202 -0
  52. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +172 -0
  53. data/doc/rdoc/classes/PhusionPassenger/DebugLogging.html +273 -0
  54. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +145 -0
  55. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +162 -0
  56. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +141 -0
  57. data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
  58. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +673 -0
  59. data/doc/rdoc/classes/PhusionPassenger/MessageChannel/InvalidHashError.html +92 -0
  60. data/doc/rdoc/classes/PhusionPassenger/MessageClient.html +415 -0
  61. data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +494 -0
  62. data/doc/rdoc/classes/PhusionPassenger/NativeSupport/FileSystemWatcher.html +96 -0
  63. data/doc/rdoc/classes/PhusionPassenger/Packaging.html +129 -0
  64. data/doc/rdoc/classes/PhusionPassenger/PlatformInfo.html +1758 -0
  65. data/doc/rdoc/classes/PhusionPassenger/Plugin.html +237 -0
  66. data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
  67. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +312 -0
  68. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner/Error.html +98 -0
  69. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +218 -0
  70. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions.html +114 -0
  71. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging.html +256 -0
  72. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ACExtension.html +139 -0
  73. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ASBenchmarkableExtension.html +118 -0
  74. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ExceptionLogger.html +135 -0
  75. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +378 -0
  76. data/doc/rdoc/classes/PhusionPassenger/Standalone.html +111 -0
  77. data/doc/rdoc/classes/PhusionPassenger/Standalone/AppFinder.html +252 -0
  78. data/doc/rdoc/classes/PhusionPassenger/Standalone/Command.html +161 -0
  79. data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile.html +368 -0
  80. data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile/DisallowedContextError.html +132 -0
  81. data/doc/rdoc/classes/PhusionPassenger/Standalone/HelpCommand.html +151 -0
  82. data/doc/rdoc/classes/PhusionPassenger/Standalone/Main.html +189 -0
  83. data/doc/rdoc/classes/PhusionPassenger/Standalone/PackageRuntimeCommand.html +177 -0
  84. data/doc/rdoc/classes/PhusionPassenger/Standalone/RuntimeInstaller.html +341 -0
  85. data/doc/rdoc/classes/PhusionPassenger/Standalone/StartCommand.html +203 -0
  86. data/doc/rdoc/classes/PhusionPassenger/Standalone/StatusCommand.html +156 -0
  87. data/doc/rdoc/classes/PhusionPassenger/Standalone/StopCommand.html +168 -0
  88. data/doc/rdoc/classes/PhusionPassenger/Standalone/Utils.html +86 -0
  89. data/doc/rdoc/classes/PhusionPassenger/Standalone/VersionCommand.html +135 -0
  90. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +125 -0
  91. data/doc/rdoc/classes/PhusionPassenger/Utils.html +1468 -0
  92. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher.html +204 -0
  93. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/DirInfo.html +171 -0
  94. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/FileInfo.html +140 -0
  95. data/doc/rdoc/classes/PhusionPassenger/Utils/HostsFileParser.html +260 -0
  96. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +169 -0
  97. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +265 -0
  98. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +120 -0
  99. data/doc/rdoc/classes/PhusionPassenger/Utils/UnseekableSocket.html +561 -0
  100. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +140 -0
  101. data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
  102. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +182 -0
  103. data/doc/rdoc/classes/Process.html +115 -0
  104. data/doc/rdoc/classes/Signal.html +139 -0
  105. data/doc/rdoc/created.rid +1 -0
  106. data/doc/rdoc/files/DEVELOPERS_TXT.html +276 -0
  107. data/doc/rdoc/files/README.html +157 -0
  108. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +92 -0
  109. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +130 -0
  110. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +135 -0
  111. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +126 -0
  112. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +128 -0
  113. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/memory_stats_rb.html +126 -0
  114. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/server_instance_rb.html +132 -0
  115. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +122 -0
  116. data/doc/rdoc/files/lib/phusion_passenger/analytics_logger_rb.html +129 -0
  117. data/doc/rdoc/files/lib/phusion_passenger/app_process_rb.html +127 -0
  118. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/application_spawner_rb.html +141 -0
  119. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/cgi_fixed_rb.html +126 -0
  120. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/framework_spawner_rb.html +146 -0
  121. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/request_handler_rb.html +125 -0
  122. data/doc/rdoc/files/lib/phusion_passenger/classic_rails_extensions/init_rb.html +132 -0
  123. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +126 -0
  124. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +122 -0
  125. data/doc/rdoc/files/lib/phusion_passenger/debug_logging_rb.html +122 -0
  126. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +147 -0
  127. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +122 -0
  128. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +127 -0
  129. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +120 -0
  130. data/doc/rdoc/files/lib/phusion_passenger/message_client_rb.html +127 -0
  131. data/doc/rdoc/files/lib/phusion_passenger/native_support_rb.html +131 -0
  132. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
  133. data/doc/rdoc/files/lib/phusion_passenger/platform_info/apache_rb.html +127 -0
  134. data/doc/rdoc/files/lib/phusion_passenger/platform_info/binary_compatibility_rb.html +129 -0
  135. data/doc/rdoc/files/lib/phusion_passenger/platform_info/compiler_rb.html +126 -0
  136. data/doc/rdoc/files/lib/phusion_passenger/platform_info/curl_rb.html +126 -0
  137. data/doc/rdoc/files/lib/phusion_passenger/platform_info/documentation_tools_rb.html +126 -0
  138. data/doc/rdoc/files/lib/phusion_passenger/platform_info/linux_rb.html +126 -0
  139. data/doc/rdoc/files/lib/phusion_passenger/platform_info/operating_system_rb.html +127 -0
  140. data/doc/rdoc/files/lib/phusion_passenger/platform_info/ruby_rb.html +128 -0
  141. data/doc/rdoc/files/lib/phusion_passenger/platform_info/zlib_rb.html +126 -0
  142. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +122 -0
  143. data/doc/rdoc/files/lib/phusion_passenger/plugin_rb.html +127 -0
  144. data/doc/rdoc/files/lib/phusion_passenger/public_api_rb.html +127 -0
  145. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +137 -0
  146. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +125 -0
  147. data/doc/rdoc/files/lib/phusion_passenger/rails3_extensions/init_rb.html +127 -0
  148. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +122 -0
  149. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +160 -0
  150. data/doc/rdoc/files/lib/phusion_passenger/standalone/app_finder_rb.html +127 -0
  151. data/doc/rdoc/files/lib/phusion_passenger/standalone/command_rb.html +135 -0
  152. data/doc/rdoc/files/lib/phusion_passenger/standalone/config_file_rb.html +126 -0
  153. data/doc/rdoc/files/lib/phusion_passenger/standalone/help_command_rb.html +126 -0
  154. data/doc/rdoc/files/lib/phusion_passenger/standalone/main_rb.html +126 -0
  155. data/doc/rdoc/files/lib/phusion_passenger/standalone/package_runtime_command_rb.html +127 -0
  156. data/doc/rdoc/files/lib/phusion_passenger/standalone/runtime_installer_rb.html +132 -0
  157. data/doc/rdoc/files/lib/phusion_passenger/standalone/start_command_rb.html +136 -0
  158. data/doc/rdoc/files/lib/phusion_passenger/standalone/status_command_rb.html +126 -0
  159. data/doc/rdoc/files/lib/phusion_passenger/standalone/stop_command_rb.html +126 -0
  160. data/doc/rdoc/files/lib/phusion_passenger/standalone/utils_rb.html +126 -0
  161. data/doc/rdoc/files/lib/phusion_passenger/standalone/version_command_rb.html +127 -0
  162. data/doc/rdoc/files/lib/phusion_passenger/utils/file_system_watcher_rb.html +126 -0
  163. data/doc/rdoc/files/lib/phusion_passenger/utils/hosts_file_parser_rb.html +120 -0
  164. data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +100 -0
  165. data/doc/rdoc/files/lib/phusion_passenger/utils/tmpdir_rb.html +122 -0
  166. data/doc/rdoc/files/lib/phusion_passenger/utils/unseekable_socket_rb.html +126 -0
  167. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +179 -0
  168. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +132 -0
  169. data/doc/rdoc/fr_class_index.html +139 -0
  170. data/doc/rdoc/fr_file_index.html +109 -0
  171. data/doc/rdoc/fr_method_index.html +435 -0
  172. data/doc/rdoc/index.html +26 -0
  173. data/doc/rdoc/rdoc-style.css +187 -0
  174. data/ext/apache2/Configuration.hpp +1 -1
  175. data/ext/apache2/Hooks.cpp +24 -2
  176. data/ext/common/AgentsStarter.hpp +57 -20
  177. data/ext/common/Constants.h +1 -1
  178. data/ext/common/ResourceLocator.h +1 -1
  179. data/ext/common/Utils/MemZeroGuard.h +1 -1
  180. data/ext/phusion_passenger/native_support.c +1 -1
  181. data/lib/phusion_passenger.rb +2 -2
  182. data/lib/phusion_passenger/abstract_installer.rb +1 -1
  183. data/lib/phusion_passenger/platform_info/apache.rb +3 -0
  184. data/lib/phusion_passenger/platform_info/binary_compatibility.rb +3 -1
  185. data/lib/phusion_passenger/platform_info/compiler.rb +25 -2
  186. data/lib/phusion_passenger/platform_info/ruby.rb +88 -14
  187. data/lib/phusion_passenger/templates/standalone/config.erb +9 -16
  188. metadata +166 -5
  189. data/ext/common/Utils/foo.cpp +0 -10
@@ -0,0 +1,26 @@
1
+
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <title>Passenger Ruby API</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ </head>
10
+
11
+ <frameset cols="20%,*">
12
+ <frameset rows="15%,55%,30%">
13
+ <frame src="fr_file_index.html" title="Files" name="Files" />
14
+ <frame src="fr_class_index.html" name="Classes" />
15
+ <frame src="fr_method_index.html" name="Methods" />
16
+ </frameset>
17
+ <frame src="files/README.html" name="docwin" />
18
+ <noframes>
19
+ <body bgcolor="white">
20
+ Click <a href="html/index.html">here</a> for a non-frames
21
+ version of this page.
22
+ </body>
23
+ </noframes>
24
+ </frameset>
25
+
26
+ </html>
@@ -0,0 +1,187 @@
1
+ a {
2
+ color: #00F;
3
+ text-decoration: none;
4
+ }
5
+
6
+ a:hover {
7
+ color: #77F;
8
+ text-decoration: underline;
9
+ }
10
+
11
+ body, td, p {
12
+ font-family: "Bitstream Vera Sans", Verdana, Arial, Helvetica, sans-serif;
13
+ background: #FFF;
14
+ color: #000;
15
+ margin: 0px;
16
+ font-size: small;
17
+ }
18
+
19
+ p {
20
+ margin-top: 0.5em;
21
+ margin-bottom: 0.5em;
22
+ }
23
+
24
+ #content {
25
+ margin: 2em;
26
+ margin-left: 3.5em;
27
+ margin-right: 3.5em;
28
+ }
29
+
30
+ #description p {
31
+ margin-bottom: 0.5em;
32
+ }
33
+
34
+ .sectiontitle {
35
+ margin-top: 1em;
36
+ margin-bottom: 1em;
37
+ padding: 0.5em;
38
+ padding-left: 2em;
39
+ background: #005;
40
+ color: #FFF;
41
+ font-weight: bold;
42
+ }
43
+
44
+ .attr-rw {
45
+ padding-left: 1em;
46
+ padding-right: 1em;
47
+ text-align: center;
48
+ color: #055;
49
+ }
50
+
51
+ .attr-name {
52
+ font-weight: bold;
53
+ }
54
+
55
+ .attr-desc {
56
+ }
57
+
58
+ .attr-value {
59
+ font-family: monospace;
60
+ }
61
+
62
+ .file-title-prefix {
63
+ font-size: large;
64
+ }
65
+
66
+ .file-title {
67
+ font-size: large;
68
+ font-weight: bold;
69
+ background: #005;
70
+ color: #FFF;
71
+ }
72
+
73
+ .banner {
74
+ background: #005;
75
+ color: #FFF;
76
+ border: 1px solid black;
77
+ padding: 1em;
78
+ }
79
+
80
+ .banner td {
81
+ background: transparent;
82
+ color: #FFF;
83
+ }
84
+
85
+ h1 a, h2 a, .sectiontitle a, .banner a {
86
+ color: #FF0;
87
+ }
88
+
89
+ h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
90
+ color: #FF7;
91
+ }
92
+
93
+ .dyn-source {
94
+ display: none;
95
+ background: #fffde8;
96
+ color: #000;
97
+ border: #ffe0bb dotted 1px;
98
+ margin: 0.5em 2em 0.5em 2em;
99
+ padding: 0.5em;
100
+ }
101
+
102
+ .dyn-source .cmt {
103
+ color: #00F;
104
+ font-style: italic;
105
+ }
106
+
107
+ .dyn-source .kw {
108
+ color: #070;
109
+ font-weight: bold;
110
+ }
111
+
112
+ .method {
113
+ margin-left: 1em;
114
+ margin-right: 1em;
115
+ margin-bottom: 1em;
116
+ }
117
+
118
+ .description pre {
119
+ padding: 0.5em;
120
+ border: #ffe0bb dotted 1px;
121
+ background: #fffde8;
122
+ }
123
+
124
+ .method .title {
125
+ font-family: monospace;
126
+ font-size: large;
127
+ border-bottom: 1px dashed black;
128
+ margin-bottom: 0.3em;
129
+ padding-bottom: 0.1em;
130
+ }
131
+
132
+ .method .description, .method .sourcecode {
133
+ margin-left: 1em;
134
+ }
135
+
136
+ .description p, .sourcecode p {
137
+ margin-bottom: 0.5em;
138
+ }
139
+
140
+ .method .sourcecode p.source-link {
141
+ text-indent: 0em;
142
+ margin-top: 0.5em;
143
+ }
144
+
145
+ .method .aka {
146
+ margin-top: 0.3em;
147
+ margin-left: 1em;
148
+ font-style: italic;
149
+ text-indent: 2em;
150
+ }
151
+
152
+ h1 {
153
+ padding: 1em;
154
+ margin-left: -1.5em;
155
+ font-size: x-large;
156
+ font-weight: bold;
157
+ color: #FFF;
158
+ background: #007;
159
+ }
160
+
161
+ h2 {
162
+ padding: 0.5em 1em 0.5em 1em;
163
+ margin-left: -1.5em;
164
+ font-size: large;
165
+ font-weight: bold;
166
+ color: #FFF;
167
+ background: #009;
168
+ }
169
+
170
+ h3, h4, h5, h6 {
171
+ color: #220088;
172
+ border-bottom: #5522bb solid 1px;
173
+ }
174
+
175
+ .sourcecode > pre {
176
+ padding: 0.5em;
177
+ border: 1px dotted black;
178
+ background: #FFE;
179
+ }
180
+
181
+ dt {
182
+ font-weight: bold
183
+ }
184
+
185
+ dd {
186
+ margin-bottom: 0.7em;
187
+ }
@@ -289,7 +289,7 @@ struct DirConfig {
289
289
  if (minInstancesSpecified) {
290
290
  return minInstances;
291
291
  } else {
292
- return 0;
292
+ return 1;
293
293
  }
294
294
  }
295
295
 
@@ -66,6 +66,7 @@
66
66
  * http://groups.google.com/group/phusion-passenger/browse_thread/thread/7e162f60df212e9c
67
67
  */
68
68
  #include <ap_config.h>
69
+ #include <ap_release.h>
69
70
  #include <httpd.h>
70
71
  #include <http_config.h>
71
72
  #include <http_core.h>
@@ -93,6 +94,17 @@ extern "C" module AP_MODULE_DECLARE_DATA passenger_module;
93
94
  #define LARGE_UPLOAD_THRESHOLD 1024 * 8
94
95
 
95
96
 
97
+ #if HTTP_VERSION(AP_SERVER_MAJORVERSION_NUMBER, AP_SERVER_MINORVERSION_NUMBER) > 2002
98
+ // Apache > 2.2.x
99
+ #define AP_GET_SERVER_VERSION_DEPRECATED
100
+ #elif HTTP_VERSION(AP_SERVER_MAJORVERSION_NUMBER, AP_SERVER_MINORVERSION_NUMBER) == 2002
101
+ // Apache == 2.2.x
102
+ #if AP_SERVER_PATCHLEVEL_NUMBER >= 14
103
+ #define AP_GET_SERVER_VERSION_DEPRECATED
104
+ #endif
105
+ #endif
106
+
107
+
96
108
  /**
97
109
  * Apache hook functions, wrapped in a class.
98
110
  *
@@ -187,7 +199,11 @@ private:
187
199
 
188
200
  // Some standard CGI headers.
189
201
  result->push_back("SERVER_SOFTWARE");
190
- result->push_back(ap_get_server_version());
202
+ #ifdef AP_GET_SERVER_VERSION_DEPRECATED
203
+ result->push_back(ap_get_server_banner());
204
+ #else
205
+ result->push_back(ap_get_server_version());
206
+ #endif
191
207
 
192
208
  // Subprocess environment variables.
193
209
  env_arr = apr_table_elts(r->subprocess_env);
@@ -1334,7 +1350,13 @@ public:
1334
1350
  server_rec *server;
1335
1351
  string configFiles;
1336
1352
 
1337
- createFile(generationPath + "/web_server.txt", ap_get_server_description());
1353
+ #ifdef AP_GET_SERVER_VERSION_DEPRECATED
1354
+ createFile(generationPath + "/web_server.txt",
1355
+ ap_get_server_description());
1356
+ #else
1357
+ createFile(generationPath + "/web_server.txt",
1358
+ ap_get_server_version());
1359
+ #endif
1338
1360
 
1339
1361
  for (server = s; server != NULL; server = server->next) {
1340
1362
  if (server->defn_name != NULL) {
@@ -46,6 +46,7 @@
46
46
  #include "Utils.h"
47
47
  #include "Utils/IOUtils.h"
48
48
  #include "Utils/Base64.h"
49
+ #include "Utils/Timer.h"
49
50
  #include "Utils/VariantMap.h"
50
51
 
51
52
  namespace Passenger {
@@ -117,10 +118,31 @@ private:
117
118
  ServerInstanceDir::GenerationPtr generation;
118
119
 
119
120
  static void
120
- killAndWait(pid_t pid) {
121
- this_thread::disable_syscall_interruption dsi;
122
- syscalls::kill(pid, SIGKILL);
123
- syscalls::waitpid(pid, NULL, 0);
121
+ killAndWait(pid_t pid, unsigned long long timeout = 0) {
122
+ if (timeout == 0 || timedWaitPid(pid, NULL, timeout) == 0) {
123
+ this_thread::disable_syscall_interruption dsi;
124
+ syscalls::kill(pid, SIGKILL);
125
+ syscalls::waitpid(pid, NULL, 0);
126
+ }
127
+ }
128
+
129
+ /**
130
+ * Behaves like <tt>waitpid(pid, status, WNOHANG)</tt>, but waits at most
131
+ * <em>timeout</em> miliseconds for the process to exit.
132
+ */
133
+ static int timedWaitPid(pid_t pid, int *status, unsigned long long timeout) {
134
+ Timer timer;
135
+ int ret;
136
+
137
+ do {
138
+ ret = syscalls::waitpid(pid, status, WNOHANG);
139
+ if (ret > 0 || ret == -1) {
140
+ return ret;
141
+ } else {
142
+ syscalls::usleep(10000);
143
+ }
144
+ } while (timer.elapsed() < timeout);
145
+ return 0; // timed out
124
146
  }
125
147
 
126
148
  /**
@@ -420,8 +442,12 @@ public:
420
442
  try {
421
443
  watchdogArgs.writeToChannel(feedbackChannel);
422
444
  } catch (const SystemException &) {
423
- /* Did the watchdog crash? */
424
- ret = syscalls::waitpid(pid, &status, WNOHANG);
445
+ /* Did the watchdog crash?
446
+ * At the time the channel was closed it might not have
447
+ * exited yet so give it a short while to exit and to
448
+ * print an error.
449
+ */
450
+ ret = timedWaitPid(pid, &status, 2000);
425
451
  if (ret == 0) {
426
452
  /* Doesn't look like it; it seems it's still running.
427
453
  * We can't do anything in this state anyway, so
@@ -437,11 +463,17 @@ public:
437
463
  "Unable to start the Phusion Passenger watchdog: "
438
464
  "it seems to have been killed with signal " +
439
465
  getSignalName(WTERMSIG(status)) + " during startup");
440
- } else {
441
- /* Looks like it exited for a different reason. */
466
+ } else if (ret == -1) {
467
+ /* Looks like it exited for a different reason and has no exit code. */
442
468
  throw RuntimeException(
443
469
  "Unable to start the Phusion Passenger watchdog: "
444
470
  "it seems to have crashed during startup for an unknown reason");
471
+ } else {
472
+ /* Looks like it exited for a different reason, but has an exit code. */
473
+ throw RuntimeException(
474
+ "Unable to start the Phusion Passenger watchdog: "
475
+ "it seems to have crashed during startup for an unknown reason, "
476
+ "with exit code " + toString(WEXITSTATUS(status)));
445
477
  }
446
478
  }
447
479
 
@@ -459,7 +491,7 @@ public:
459
491
  /* The feedback fd was closed for an unknown reason.
460
492
  * Did the watchdog crash?
461
493
  */
462
- ret = syscalls::waitpid(pid, &status, WNOHANG);
494
+ ret = timedWaitPid(pid, &status, 2000);
463
495
  if (ret == 0) {
464
496
  /* Doesn't look like it; it seems it's still running.
465
497
  * We can't do anything without proper feedback so kill
@@ -473,14 +505,19 @@ public:
473
505
  throw RuntimeException("Unable to start the Phusion Passenger watchdog: "
474
506
  "it seems to have been killed with signal " +
475
507
  getSignalName(WTERMSIG(status)) + " during startup");
476
- } else {
508
+ } else if (ret == -1) {
477
509
  /* Looks like it exited after detecting an error. */
478
510
  throw RuntimeException("Unable to start the Phusion Passenger watchdog: "
479
511
  "it seems to have crashed during startup for an unknown reason");
512
+ } else {
513
+ throw RuntimeException(
514
+ "Unable to start the Phusion Passenger watchdog: "
515
+ "it seems to have crashed during startup for an unknown reason, "
516
+ "with exit code " + toString(WEXITSTATUS(status)));
480
517
  }
481
518
  }
482
519
  } catch (const SystemException &ex) {
483
- killAndWait(pid);
520
+ killAndWait(pid, 2000);
484
521
  throw SystemException("Unable to start the Phusion Passenger watchdog: "
485
522
  "unable to read its startup information",
486
523
  ex.code());
@@ -488,7 +525,7 @@ public:
488
525
  // Watchdog has already exited, no need to kill it.
489
526
  throw;
490
527
  } catch (...) {
491
- killAndWait(pid);
528
+ killAndWait(pid, 2000);
492
529
  throw;
493
530
  }
494
531
 
@@ -498,7 +535,7 @@ public:
498
535
  serverInstanceDir.reset(new ServerInstanceDir(args[1], false));
499
536
  generation = serverInstanceDir->getGeneration(atoi(args[2]));
500
537
  } else {
501
- killAndWait(pid);
538
+ killAndWait(pid, 2000);
502
539
  throw IOException("Unable to start the Phusion Passenger watchdog: "
503
540
  "it returned an invalid basic startup information message");
504
541
  }
@@ -508,10 +545,10 @@ public:
508
545
  "because it encountered the following error during startup: " +
509
546
  args[1]);
510
547
  } else if (args[0] == "system error") {
511
- killAndWait(pid);
548
+ killAndWait(pid, 2000);
512
549
  throw SystemException(args[1], atoi(args[2]));
513
550
  } else if (args[0] == "exec error") {
514
- killAndWait(pid);
551
+ killAndWait(pid, 2000);
515
552
  throw SystemException("Unable to start the Phusion Passenger watchdog (" +
516
553
  watchdogFilename + ")", atoi(args[1]));
517
554
  }
@@ -537,7 +574,7 @@ public:
537
574
  * We can't do anything without proper feedback so kill
538
575
  * the watchdo and throw an exception.
539
576
  */
540
- killAndWait(pid);
577
+ killAndWait(pid, 2000);
541
578
  throw RuntimeException("Unable to start the Phusion Passenger watchdog: "
542
579
  "an unknown error occurred during its startup");
543
580
  } else if (ret != -1 && WIFSIGNALED(status)) {
@@ -552,7 +589,7 @@ public:
552
589
  }
553
590
  }
554
591
  } catch (const SystemException &ex) {
555
- killAndWait(pid);
592
+ killAndWait(pid, 2000);
556
593
  throw SystemException("Unable to start the Phusion Passenger watchdog: "
557
594
  "unable to read all agent startup information",
558
595
  ex.code());
@@ -560,7 +597,7 @@ public:
560
597
  // Watchdog has already exited, no need to kill it.
561
598
  throw;
562
599
  } catch (...) {
563
- killAndWait(pid);
600
+ killAndWait(pid, 2000);
564
601
  throw;
565
602
  }
566
603
 
@@ -587,7 +624,7 @@ public:
587
624
  loggingSocketAddress = args[1];
588
625
  loggingSocketPassword = args[2];
589
626
  } else {
590
- killAndWait(pid);
627
+ killAndWait(pid, 2000);
591
628
  throw IOException("Unable to start the Phusion Passenger watchdog: "
592
629
  "it returned an invalid initialization feedback message");
593
630
  }
@@ -595,7 +632,7 @@ public:
595
632
  allAgentsStarted = true;
596
633
  } else {
597
634
  UPDATE_TRACE_POINT();
598
- killAndWait(pid);
635
+ killAndWait(pid, 2000);
599
636
  throw RuntimeException("One of the Passenger agents sent an unknown feedback message '" + args[0] + "'");
600
637
  }
601
638
  }