passenger 2.0.1 → 2.0.2

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 (243) hide show
  1. data/Rakefile +2 -1
  2. data/doc/Security of user switching support.html +1 -1
  3. data/doc/Users guide.html +1 -1
  4. data/ext/apache2/ApplicationPoolServerExecutable.cpp +4 -2
  5. data/ext/apache2/Bucket.cpp +104 -0
  6. data/ext/apache2/Bucket.h +36 -0
  7. data/ext/apache2/Configuration.h +1 -1
  8. data/ext/apache2/Hooks.cpp +2 -5
  9. data/ext/apache2/Utils.h +1 -1
  10. data/ext/boost/non_type.hpp +27 -0
  11. metadata +7 -247
  12. data/doc/Architectural overview.html +0 -740
  13. data/doc/cxxapi/ApplicationPoolServer_8h-source.html +0 -677
  14. data/doc/cxxapi/ApplicationPool_8h-source.html +0 -212
  15. data/doc/cxxapi/Application_8h-source.html +0 -448
  16. data/doc/cxxapi/Configuration_8h-source.html +0 -180
  17. data/doc/cxxapi/DummySpawnManager_8h-source.html +0 -126
  18. data/doc/cxxapi/Exceptions_8h-source.html +0 -244
  19. data/doc/cxxapi/Hooks_8h-source.html +0 -63
  20. data/doc/cxxapi/Logging_8h-source.html +0 -136
  21. data/doc/cxxapi/MessageChannel_8h-source.html +0 -524
  22. data/doc/cxxapi/SpawnManager_8h-source.html +0 -593
  23. data/doc/cxxapi/StandardApplicationPool_8h-source.html +0 -713
  24. data/doc/cxxapi/System_8h-source.html +0 -251
  25. data/doc/cxxapi/Utils_8h-source.html +0 -283
  26. data/doc/cxxapi/annotated.html +0 -59
  27. data/doc/cxxapi/classClient-members.html +0 -35
  28. data/doc/cxxapi/classClient.html +0 -117
  29. data/doc/cxxapi/classDirectoryMapper-members.html +0 -38
  30. data/doc/cxxapi/classDirectoryMapper.html +0 -203
  31. data/doc/cxxapi/classHooks-members.html +0 -33
  32. data/doc/cxxapi/classHooks.html +0 -43
  33. data/doc/cxxapi/classPassenger_1_1Application-members.html +0 -38
  34. data/doc/cxxapi/classPassenger_1_1Application.html +0 -229
  35. data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +0 -40
  36. data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +0 -331
  37. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +0 -36
  38. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +0 -225
  39. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +0 -1
  40. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +0 -1
  41. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
  42. data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +0 -43
  43. data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +0 -329
  44. data/doc/cxxapi/classPassenger_1_1BusyException-members.html +0 -33
  45. data/doc/cxxapi/classPassenger_1_1BusyException.html +0 -47
  46. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +0 -33
  47. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +0 -44
  48. data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +0 -33
  49. data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +0 -51
  50. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +0 -33
  51. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +0 -51
  52. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +0 -1
  53. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +0 -1
  54. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
  55. data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +0 -38
  56. data/doc/cxxapi/classPassenger_1_1FileSystemException.html +0 -61
  57. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +0 -1
  58. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +0 -1
  59. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
  60. data/doc/cxxapi/classPassenger_1_1IOException-members.html +0 -33
  61. data/doc/cxxapi/classPassenger_1_1IOException.html +0 -54
  62. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +0 -1
  63. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +0 -1
  64. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
  65. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +0 -47
  66. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +0 -591
  67. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +0 -35
  68. data/doc/cxxapi/classPassenger_1_1SpawnException.html +0 -77
  69. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +0 -37
  70. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +0 -255
  71. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +0 -42
  72. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +0 -372
  73. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +0 -1
  74. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +0 -1
  75. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
  76. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +0 -37
  77. data/doc/cxxapi/classPassenger_1_1SystemException.html +0 -154
  78. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +0 -1
  79. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +0 -1
  80. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
  81. data/doc/cxxapi/classPassenger_1_1TempFile-members.html +0 -36
  82. data/doc/cxxapi/classPassenger_1_1TempFile.html +0 -128
  83. data/doc/cxxapi/classPassenger_1_1Thread-members.html +0 -35
  84. data/doc/cxxapi/classPassenger_1_1Thread.html +0 -100
  85. data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption-members.html +0 -33
  86. data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption.html +0 -46
  87. data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption-members.html +0 -33
  88. data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption.html +0 -44
  89. data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption-members.html +0 -33
  90. data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption.html +0 -44
  91. data/doc/cxxapi/definitions_8h-source.html +0 -28
  92. data/doc/cxxapi/doxygen.css +0 -433
  93. data/doc/cxxapi/doxygen.png +0 -0
  94. data/doc/cxxapi/files.html +0 -41
  95. data/doc/cxxapi/ftv2blank.png +0 -0
  96. data/doc/cxxapi/ftv2doc.png +0 -0
  97. data/doc/cxxapi/ftv2folderclosed.png +0 -0
  98. data/doc/cxxapi/ftv2folderopen.png +0 -0
  99. data/doc/cxxapi/ftv2lastnode.png +0 -0
  100. data/doc/cxxapi/ftv2link.png +0 -0
  101. data/doc/cxxapi/ftv2mlastnode.png +0 -0
  102. data/doc/cxxapi/ftv2mnode.png +0 -0
  103. data/doc/cxxapi/ftv2node.png +0 -0
  104. data/doc/cxxapi/ftv2plastnode.png +0 -0
  105. data/doc/cxxapi/ftv2pnode.png +0 -0
  106. data/doc/cxxapi/ftv2vertline.png +0 -0
  107. data/doc/cxxapi/functions.html +0 -212
  108. data/doc/cxxapi/functions_func.html +0 -207
  109. data/doc/cxxapi/functions_type.html +0 -46
  110. data/doc/cxxapi/functions_vars.html +0 -48
  111. data/doc/cxxapi/graph_legend.dot +0 -22
  112. data/doc/cxxapi/graph_legend.html +0 -87
  113. data/doc/cxxapi/graph_legend.png +0 -0
  114. data/doc/cxxapi/group__Configuration.html +0 -236
  115. data/doc/cxxapi/group__Configuration.png +0 -0
  116. data/doc/cxxapi/group__Core.html +0 -51
  117. data/doc/cxxapi/group__Core.png +0 -0
  118. data/doc/cxxapi/group__Exceptions.html +0 -43
  119. data/doc/cxxapi/group__Hooks.html +0 -46
  120. data/doc/cxxapi/group__Hooks.png +0 -0
  121. data/doc/cxxapi/group__Support.html +0 -406
  122. data/doc/cxxapi/hierarchy.html +0 -67
  123. data/doc/cxxapi/index.html +0 -11
  124. data/doc/cxxapi/inherit__graph__0.map +0 -1
  125. data/doc/cxxapi/inherit__graph__0.md5 +0 -1
  126. data/doc/cxxapi/inherit__graph__0.png +0 -0
  127. data/doc/cxxapi/inherit__graph__1.map +0 -1
  128. data/doc/cxxapi/inherit__graph__1.md5 +0 -1
  129. data/doc/cxxapi/inherit__graph__1.png +0 -0
  130. data/doc/cxxapi/inherit__graph__10.map +0 -1
  131. data/doc/cxxapi/inherit__graph__10.md5 +0 -1
  132. data/doc/cxxapi/inherit__graph__10.png +0 -0
  133. data/doc/cxxapi/inherit__graph__11.map +0 -1
  134. data/doc/cxxapi/inherit__graph__11.md5 +0 -1
  135. data/doc/cxxapi/inherit__graph__11.png +0 -0
  136. data/doc/cxxapi/inherit__graph__12.map +0 -1
  137. data/doc/cxxapi/inherit__graph__12.md5 +0 -1
  138. data/doc/cxxapi/inherit__graph__12.png +0 -0
  139. data/doc/cxxapi/inherit__graph__13.map +0 -1
  140. data/doc/cxxapi/inherit__graph__13.md5 +0 -1
  141. data/doc/cxxapi/inherit__graph__13.png +0 -0
  142. data/doc/cxxapi/inherit__graph__14.map +0 -2
  143. data/doc/cxxapi/inherit__graph__14.md5 +0 -1
  144. data/doc/cxxapi/inherit__graph__14.png +0 -0
  145. data/doc/cxxapi/inherit__graph__15.map +0 -1
  146. data/doc/cxxapi/inherit__graph__15.md5 +0 -1
  147. data/doc/cxxapi/inherit__graph__15.png +0 -0
  148. data/doc/cxxapi/inherit__graph__16.map +0 -1
  149. data/doc/cxxapi/inherit__graph__16.md5 +0 -1
  150. data/doc/cxxapi/inherit__graph__16.png +0 -0
  151. data/doc/cxxapi/inherit__graph__17.map +0 -1
  152. data/doc/cxxapi/inherit__graph__17.md5 +0 -1
  153. data/doc/cxxapi/inherit__graph__17.png +0 -0
  154. data/doc/cxxapi/inherit__graph__2.map +0 -1
  155. data/doc/cxxapi/inherit__graph__2.md5 +0 -1
  156. data/doc/cxxapi/inherit__graph__2.png +0 -0
  157. data/doc/cxxapi/inherit__graph__3.map +0 -1
  158. data/doc/cxxapi/inherit__graph__3.md5 +0 -1
  159. data/doc/cxxapi/inherit__graph__3.png +0 -0
  160. data/doc/cxxapi/inherit__graph__4.map +0 -1
  161. data/doc/cxxapi/inherit__graph__4.md5 +0 -1
  162. data/doc/cxxapi/inherit__graph__4.png +0 -0
  163. data/doc/cxxapi/inherit__graph__5.map +0 -1
  164. data/doc/cxxapi/inherit__graph__5.md5 +0 -1
  165. data/doc/cxxapi/inherit__graph__5.png +0 -0
  166. data/doc/cxxapi/inherit__graph__6.map +0 -1
  167. data/doc/cxxapi/inherit__graph__6.md5 +0 -1
  168. data/doc/cxxapi/inherit__graph__6.png +0 -0
  169. data/doc/cxxapi/inherit__graph__7.map +0 -1
  170. data/doc/cxxapi/inherit__graph__7.md5 +0 -1
  171. data/doc/cxxapi/inherit__graph__7.png +0 -0
  172. data/doc/cxxapi/inherit__graph__8.map +0 -1
  173. data/doc/cxxapi/inherit__graph__8.md5 +0 -1
  174. data/doc/cxxapi/inherit__graph__8.png +0 -0
  175. data/doc/cxxapi/inherit__graph__9.map +0 -2
  176. data/doc/cxxapi/inherit__graph__9.md5 +0 -1
  177. data/doc/cxxapi/inherit__graph__9.png +0 -0
  178. data/doc/cxxapi/inherits.html +0 -102
  179. data/doc/cxxapi/main.html +0 -27
  180. data/doc/cxxapi/modules.html +0 -34
  181. data/doc/cxxapi/namespacePassenger.html +0 -208
  182. data/doc/cxxapi/namespacePassenger_1_1InterruptableCalls.html +0 -43
  183. data/doc/cxxapi/namespacemembers.html +0 -70
  184. data/doc/cxxapi/namespacemembers_func.html +0 -66
  185. data/doc/cxxapi/namespacemembers_type.html +0 -46
  186. data/doc/cxxapi/namespaces.html +0 -35
  187. data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +0 -33
  188. data/doc/cxxapi/structPassenger_1_1AnythingToString.html +0 -49
  189. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +0 -33
  190. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +0 -49
  191. data/doc/cxxapi/tab_b.gif +0 -0
  192. data/doc/cxxapi/tab_l.gif +0 -0
  193. data/doc/cxxapi/tab_r.gif +0 -0
  194. data/doc/cxxapi/tabs.css +0 -102
  195. data/doc/cxxapi/tree.html +0 -166
  196. data/doc/rdoc/classes/ConditionVariable.html +0 -160
  197. data/doc/rdoc/classes/Exception.html +0 -120
  198. data/doc/rdoc/classes/GC.html +0 -113
  199. data/doc/rdoc/classes/IO.html +0 -150
  200. data/doc/rdoc/classes/Passenger.html +0 -136
  201. data/doc/rdoc/classes/Passenger/AbstractRequestHandler.html +0 -401
  202. data/doc/rdoc/classes/Passenger/AbstractServer.html +0 -649
  203. data/doc/rdoc/classes/Passenger/AbstractServer/ServerAlreadyStarted.html +0 -97
  204. data/doc/rdoc/classes/Passenger/AbstractServer/ServerError.html +0 -96
  205. data/doc/rdoc/classes/Passenger/AbstractServer/ServerNotStarted.html +0 -97
  206. data/doc/rdoc/classes/Passenger/AbstractServer/UnknownMessage.html +0 -96
  207. data/doc/rdoc/classes/Passenger/AppInitError.html +0 -137
  208. data/doc/rdoc/classes/Passenger/Application.html +0 -296
  209. data/doc/rdoc/classes/Passenger/ConsoleTextTemplate.html +0 -172
  210. data/doc/rdoc/classes/Passenger/FrameworkInitError.html +0 -143
  211. data/doc/rdoc/classes/Passenger/HTMLTemplate.html +0 -175
  212. data/doc/rdoc/classes/Passenger/InitializationError.html +0 -141
  213. data/doc/rdoc/classes/Passenger/MessageChannel.html +0 -488
  214. data/doc/rdoc/classes/Passenger/NativeSupport.html +0 -320
  215. data/doc/rdoc/classes/Passenger/SpawnManager.html +0 -375
  216. data/doc/rdoc/classes/Passenger/UnknownError.html +0 -125
  217. data/doc/rdoc/classes/Passenger/Utils.html +0 -580
  218. data/doc/rdoc/classes/Passenger/VersionNotFound.html +0 -140
  219. data/doc/rdoc/classes/PlatformInfo.html +0 -292
  220. data/doc/rdoc/classes/RakeExtensions.html +0 -197
  221. data/doc/rdoc/created.rid +0 -1
  222. data/doc/rdoc/files/DEVELOPERS_TXT.html +0 -230
  223. data/doc/rdoc/files/README.html +0 -150
  224. data/doc/rdoc/files/ext/passenger/native_support_c.html +0 -92
  225. data/doc/rdoc/files/lib/passenger/abstract_request_handler_rb.html +0 -125
  226. data/doc/rdoc/files/lib/passenger/abstract_server_rb.html +0 -127
  227. data/doc/rdoc/files/lib/passenger/application_rb.html +0 -123
  228. data/doc/rdoc/files/lib/passenger/console_text_template_rb.html +0 -122
  229. data/doc/rdoc/files/lib/passenger/constants_rb.html +0 -114
  230. data/doc/rdoc/files/lib/passenger/dependencies_rb.html +0 -130
  231. data/doc/rdoc/files/lib/passenger/exceptions_rb.html +0 -118
  232. data/doc/rdoc/files/lib/passenger/html_template_rb.html +0 -122
  233. data/doc/rdoc/files/lib/passenger/message_channel_rb.html +0 -118
  234. data/doc/rdoc/files/lib/passenger/platform_info_rb.html +0 -122
  235. data/doc/rdoc/files/lib/passenger/simple_benchmarking_rb.html +0 -118
  236. data/doc/rdoc/files/lib/passenger/spawn_manager_rb.html +0 -139
  237. data/doc/rdoc/files/lib/passenger/utils_rb.html +0 -130
  238. data/doc/rdoc/files/lib/rake/extensions_rb.html +0 -122
  239. data/doc/rdoc/fr_class_index.html +0 -71
  240. data/doc/rdoc/fr_file_index.html +0 -63
  241. data/doc/rdoc/fr_method_index.html +0 -120
  242. data/doc/rdoc/index.html +0 -26
  243. data/doc/rdoc/rdoc-style.css +0 -187
@@ -1,320 +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>Module: Passenger::NativeSupport</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 />Passenger::NativeSupport</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/ext/passenger/native_support_c.html">ext/passenger/native_support.c</a>
61
- </td>
62
- </tr>
63
- </table>
64
- </td>
65
- </tr>
66
- </table>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
- <div id="content">
71
-
72
- <div class="description"><p>
73
- Utility functions for accessing system functionality.
74
- </p>
75
- </div>
76
-
77
-
78
-
79
- <div class="sectiontitle">Methods</div>
80
- <ul>
81
- <li><a href="#M000012">accept</a></li>
82
- <li><a href="#M000013">close_all_file_descriptors</a></li>
83
- <li><a href="#M000011">create_unix_socket</a></li>
84
- <li><a href="#M000010">recv_fd</a></li>
85
- <li><a href="#M000009">send_fd</a></li>
86
- </ul>
87
-
88
-
89
-
90
-
91
- <div class="sectiontitle">Constants</div>
92
- <table border='0' cellpadding='5'>
93
- <tr valign='top'>
94
- <td class="attr-name">UNIX_PATH_MAX</td>
95
- <td>=</td>
96
- <td class="attr-value">INT2NUM(sizeof(addr.sun_path))</td>
97
- </tr>
98
- <tr valign='top'>
99
- <td>&nbsp;</td>
100
- <td colspan="2" class="attr-desc">
101
- The maximum length of a Unix socket path, including terminating null.
102
-
103
- </td>
104
- </tr>
105
- </table>
106
-
107
-
108
- <div class="sectiontitle">Public Class methods</div>
109
- <div class="method">
110
- <div class="title">
111
- <a name="M000012"></a><b> accept(fileno)<br />
112
- </b>
113
- </div>
114
- <div class="description">
115
- <p>
116
- Accept a new client from the given socket.
117
- </p>
118
- <ul>
119
- <li><tt>fileno</tt> (integer): The file descriptor of the server socket.
120
-
121
- </li>
122
- <li>Returns: The accepted client&#8216;s file descriptor.
123
-
124
- </li>
125
- <li>Raises <tt>SystemCallError</tt> if something went wrong.
126
-
127
- </li>
128
- </ul>
129
- </div>
130
- <div class="sourcecode">
131
- <p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p>
132
- <div id="M000012_source" class="dyn-source">
133
- <pre>
134
- /*
135
- * call-seq: accept(fileno)
136
- *
137
- * Accept a new client from the given socket.
138
- *
139
- * - +fileno+ (integer): The file descriptor of the server socket.
140
- * - Returns: The accepted client's file descriptor.
141
- * - Raises +SystemCallError+ if something went wrong.
142
- */
143
- static VALUE
144
- f_accept(VALUE self, VALUE fileno) {
145
-
146
- </pre>
147
- </div>
148
- </div>
149
- </div>
150
- <div class="method">
151
- <div class="title">
152
- <a name="M000013"></a><b> close_all_file_descriptors(exceptions)<br />
153
- </b>
154
- </div>
155
- <div class="description">
156
- <p>
157
- Close all file descriptors, except those given in the <tt>exceptions</tt>
158
- array. For example, the following would close all file descriptors except
159
- standard input (0) and standard output (1).
160
- </p>
161
- <pre>
162
- close_all_file_descriptors([0, 1])
163
- </pre>
164
- </div>
165
- <div class="sourcecode">
166
- <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p>
167
- <div id="M000013_source" class="dyn-source">
168
- <pre>
169
- /*
170
- * call-seq: close_all_file_descriptors(exceptions)
171
- *
172
- * Close all file descriptors, except those given in the +exceptions+ array.
173
- * For example, the following would close all file descriptors except standard
174
- * input (0) and standard output (1).
175
- *
176
- * close_all_file_descriptors([0, 1])
177
- */
178
- static VALUE
179
- close_all_file_descriptors(VALUE self, VALUE exceptions) {
180
-
181
- </pre>
182
- </div>
183
- </div>
184
- </div>
185
- <div class="method">
186
- <div class="title">
187
- <a name="M000011"></a><b> create_unix_socket(filename, backlog)<br />
188
- </b>
189
- </div>
190
- <div class="description">
191
- <p>
192
- Create a SOCK_STREAM server Unix socket. Unlike Ruby&#8216;s UNIXServer
193
- class, this function is also able to create Unix sockets on the abstract
194
- namespace by prepending the filename with a null byte.
195
- </p>
196
- <ul>
197
- <li><tt>filename</tt> (string): The filename of the Unix socket to create.
198
-
199
- </li>
200
- <li><tt>backlog</tt> (integer): The backlog to use for listening on the socket.
201
-
202
- </li>
203
- <li>Returns: The file descriptor of the created Unix socket, as an integer.
204
-
205
- </li>
206
- <li>Raises <tt>SystemCallError</tt> if something went wrong.
207
-
208
- </li>
209
- </ul>
210
- </div>
211
- <div class="sourcecode">
212
- <p class="source-link">[ <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show source</a> ]</p>
213
- <div id="M000011_source" class="dyn-source">
214
- <pre>
215
- /*
216
- * call-seq: create_unix_socket(filename, backlog)
217
- *
218
- * Create a SOCK_STREAM server Unix socket. Unlike Ruby's UNIXServer class,
219
- * this function is also able to create Unix sockets on the abstract namespace
220
- * by prepending the filename with a null byte.
221
- *
222
- * - +filename+ (string): The filename of the Unix socket to create.
223
- * - +backlog+ (integer): The backlog to use for listening on the socket.
224
- * - Returns: The file descriptor of the created Unix socket, as an integer.
225
- * - Raises +SystemCallError+ if something went wrong.
226
- */
227
- static VALUE
228
- create_unix_socket(VALUE self, VALUE filename, VALUE backlog) {
229
-
230
- </pre>
231
- </div>
232
- </div>
233
- </div>
234
- <div class="method">
235
- <div class="title">
236
- <a name="M000010"></a><b> recv_fd(socket_fd)<br />
237
- </b>
238
- </div>
239
- <div class="description">
240
- <p>
241
- Receive a file descriptor from the given Unix socket. Returns the received
242
- file descriptor as an integer. Raises <tt>SystemCallError</tt> if something
243
- went wrong.
244
- </p>
245
- <p>
246
- You do not have call this method directly. A convenience wrapper is
247
- provided by <a href="../IO.html#M000004">IO#recv_io</a>.
248
- </p>
249
- </div>
250
- <div class="sourcecode">
251
- <p class="source-link">[ <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show source</a> ]</p>
252
- <div id="M000010_source" class="dyn-source">
253
- <pre>
254
- /*
255
- * call-seq: recv_fd(socket_fd)
256
- *
257
- * Receive a file descriptor from the given Unix socket. Returns the received
258
- * file descriptor as an integer. Raises +SystemCallError+ if something went
259
- * wrong.
260
- *
261
- * You do not have call this method directly. A convenience wrapper is
262
- * provided by IO#recv_io.
263
- */
264
- static VALUE
265
- recv_fd(VALUE self, VALUE socket_fd) {
266
-
267
- </pre>
268
- </div>
269
- </div>
270
- </div>
271
- <div class="method">
272
- <div class="title">
273
- <a name="M000009"></a><b> send_fd(socket_fd, fd_to_send)<br />
274
- </b>
275
- </div>
276
- <div class="description">
277
- <p>
278
- Send a file descriptor over the given Unix socket. You do not have to call
279
- this function directly. A convenience wrapper is provided by <a
280
- href="../IO.html#M000003">IO#send_io</a>.
281
- </p>
282
- <ul>
283
- <li><tt>socket_fd</tt> (integer): The file descriptor of the socket.
284
-
285
- </li>
286
- <li><tt>fd_to_send</tt> (integer): The file descriptor to send.
287
-
288
- </li>
289
- <li>Raises <tt>SystemCallError</tt> if something went wrong.
290
-
291
- </li>
292
- </ul>
293
- </div>
294
- <div class="sourcecode">
295
- <p class="source-link">[ <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show source</a> ]</p>
296
- <div id="M000009_source" class="dyn-source">
297
- <pre>
298
- /*
299
- * call-seq: send_fd(socket_fd, fd_to_send)
300
- *
301
- * Send a file descriptor over the given Unix socket. You do not have to call
302
- * this function directly. A convenience wrapper is provided by IO#send_io.
303
- *
304
- * - +socket_fd+ (integer): The file descriptor of the socket.
305
- * - +fd_to_send+ (integer): The file descriptor to send.
306
- * - Raises +SystemCallError+ if something went wrong.
307
- */
308
- static VALUE
309
- send_fd(VALUE self, VALUE socket_fd, VALUE fd_to_send) {
310
-
311
- </pre>
312
- </div>
313
- </div>
314
- </div>
315
- </div>
316
-
317
- </div>
318
-
319
- </body>
320
- </html>
@@ -1,375 +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: Passenger::SpawnManager</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 />Passenger::SpawnManager</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/passenger/spawn_manager_rb.html">lib/passenger/spawn_manager.rb</a>
61
- </td>
62
- </tr>
63
- <tr>
64
- <td>Parent:</td>
65
- <td>
66
- <a href="AbstractServer.html">
67
- AbstractServer
68
- </a>
69
- </td>
70
- </tr>
71
- </table>
72
- </td>
73
- </tr>
74
- </table>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
- <div id="content">
79
-
80
- <div class="description"><p>
81
- The spawn manager is capable of spawning Ruby on Rails or Rack application
82
- instances. It acts like a simple fascade for the rest of the spawn manager
83
- system.
84
- </p>
85
- <p>
86
- <b>Note</b>: <a href="SpawnManager.html">SpawnManager</a> may only be
87
- started synchronously with <a
88
- href="AbstractServer.html#M000054">AbstractServer#start_synchronously</a>.
89
- Starting asynchronously has not been tested. Don&#8216;t forget to call <a
90
- href="SpawnManager.html#M000047">cleanup</a> after the server&#8216;s main
91
- loop has finished.
92
- </p>
93
- <h2>Ruby on Rails optimizations ===</h2>
94
- <p>
95
- Spawning a Ruby on Rails application is usually slow. But <a
96
- href="SpawnManager.html">SpawnManager</a> will preload and cache Ruby on
97
- Rails frameworks, as well as application code, so subsequent spawns will be
98
- very fast.
99
- </p>
100
- <p>
101
- Internally, <a href="SpawnManager.html">SpawnManager</a> uses
102
- Railz::FrameworkSpawner to preload and cache Ruby on Rails frameworks.
103
- Railz::FrameworkSpawner, in turn, uses Railz::ApplicationSpawner to preload
104
- and cache application code.
105
- </p>
106
- <p>
107
- In case you&#8216;re wondering why the namespace is &quot;Railz&quot; and
108
- not &quot;Rails&quot;: it&#8216;s to work around an obscure bug in
109
- ActiveSupport&#8216;s Dispatcher.
110
- </p>
111
- </div>
112
-
113
-
114
-
115
- <div class="sectiontitle">Methods</div>
116
- <ul>
117
- <li><a href="#M000047">cleanup</a></li>
118
- <li><a href="#M000044">new</a></li>
119
- <li><a href="#M000046">reload</a></li>
120
- <li><a href="#M000045">spawn_application</a></li>
121
- </ul>
122
-
123
- <div class="sectiontitle">Included Modules</div>
124
- <ul>
125
- <li><a href="Utils.html">Utils</a></li>
126
- </ul>
127
-
128
-
129
-
130
-
131
-
132
- <div class="sectiontitle">Public Class methods</div>
133
- <div class="method">
134
- <div class="title">
135
- <a name="M000044"></a><b>new</b>()
136
- </div>
137
- <div class="sourcecode">
138
- <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p>
139
- <div id="M000044_source" class="dyn-source">
140
- <pre>
141
- <span class="ruby-comment cmt"># File lib/passenger/spawn_manager.rb, line 48</span>
142
- 48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
143
- 49: <span class="ruby-keyword kw">super</span>()
144
- 50: <span class="ruby-ivar">@spawners</span> = {}
145
- 51: <span class="ruby-ivar">@lock</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>
146
- 52: <span class="ruby-ivar">@cond</span> = <span class="ruby-constant">ConditionVariable</span>.<span class="ruby-identifier">new</span>
147
- 53: <span class="ruby-ivar">@cleaner_thread</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
148
- 54: <span class="ruby-identifier">cleaner_thread_main</span>
149
- 55: <span class="ruby-keyword kw">end</span>
150
- 56: <span class="ruby-identifier">define_message_handler</span>(<span class="ruby-identifier">:spawn_application</span>, <span class="ruby-identifier">:handle_spawn_application</span>)
151
- 57: <span class="ruby-identifier">define_message_handler</span>(<span class="ruby-identifier">:reload</span>, <span class="ruby-identifier">:handle_reload</span>)
152
- 58: <span class="ruby-identifier">define_signal_handler</span>(<span class="ruby-value str">'SIGHUP'</span>, <span class="ruby-identifier">:reload</span>)
153
- 59:
154
- 60: <span class="ruby-constant">GC</span>.<span class="ruby-identifier">start</span>
155
- 61: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">GC</span>.<span class="ruby-identifier">copy_on_write_friendly?</span>
156
- 62: <span class="ruby-comment cmt"># Preload libraries for copy-on-write semantics.</span>
157
- 63: <span class="ruby-identifier">require</span> <span class="ruby-value str">'base64'</span>
158
- 64: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/application'</span>
159
- 65: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/railz/framework_spawner'</span>
160
- 66: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/railz/application_spawner'</span>
161
- 67: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/rack/application_spawner'</span>
162
- 68: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/html_template'</span>
163
- 69: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/platform_info'</span>
164
- 70: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/exceptions'</span>
165
- 71:
166
- 72: <span class="ruby-comment cmt"># Commonly used libraries.</span>
167
- 73: [<span class="ruby-value str">'mysql'</span>, <span class="ruby-value str">'sqlite3'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">lib</span><span class="ruby-operator">|</span>
168
- 74: <span class="ruby-identifier">require</span> <span class="ruby-identifier">lib</span>
169
- 75: <span class="ruby-keyword kw">end</span>
170
- 76: <span class="ruby-keyword kw">end</span>
171
- 77: <span class="ruby-keyword kw">end</span>
172
- </pre>
173
- </div>
174
- </div>
175
- </div>
176
- <div class="sectiontitle">Public Instance methods</div>
177
- <div class="method">
178
- <div class="title">
179
- <a name="M000047"></a><b>cleanup</b>()
180
- </div>
181
- <div class="description">
182
- <p>
183
- Cleanup resources. Should be called when this <a
184
- href="SpawnManager.html">SpawnManager</a> is no longer needed.
185
- </p>
186
- </div>
187
- <div class="sourcecode">
188
- <p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p>
189
- <div id="M000047_source" class="dyn-source">
190
- <pre>
191
- <span class="ruby-comment cmt"># File lib/passenger/spawn_manager.rb, line 169</span>
192
- 169: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cleanup</span>
193
- 170: <span class="ruby-ivar">@lock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
194
- 171: <span class="ruby-ivar">@cond</span>.<span class="ruby-identifier">signal</span>
195
- 172: <span class="ruby-keyword kw">end</span>
196
- 173: <span class="ruby-ivar">@cleaner_thread</span>.<span class="ruby-identifier">join</span>
197
- 174: <span class="ruby-ivar">@lock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
198
- 175: <span class="ruby-ivar">@spawners</span>.<span class="ruby-identifier">each_value</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spawner</span><span class="ruby-operator">|</span>
199
- 176: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spawner</span>.<span class="ruby-identifier">started?</span>
200
- 177: <span class="ruby-identifier">spawner</span>.<span class="ruby-identifier">stop</span>
201
- 178: <span class="ruby-keyword kw">end</span>
202
- 179: <span class="ruby-keyword kw">end</span>
203
- 180: <span class="ruby-ivar">@spawners</span>.<span class="ruby-identifier">clear</span>
204
- 181: <span class="ruby-keyword kw">end</span>
205
- 182: <span class="ruby-keyword kw">end</span>
206
- </pre>
207
- </div>
208
- </div>
209
- </div>
210
- <div class="method">
211
- <div class="title">
212
- <a name="M000046"></a><b>reload</b>(app_root = nil)
213
- </div>
214
- <div class="description">
215
- <p>
216
- Remove the cached application instances at the given application root. If
217
- nil is specified as application root, then all cached application instances
218
- will be removed, no matter the application root.
219
- </p>
220
- <p>
221
- <b>Long description:</b> <a href="Application.html">Application</a> code
222
- might be cached in memory. But once it a while, it will be necessary to <a
223
- href="SpawnManager.html#M000046">reload</a> the code for an application,
224
- such as after deploying a <a href="SpawnManager.html#M000044">new</a>
225
- version of the application. This method makes sure that any cached
226
- application code is removed, so that the next time an application instance
227
- is spawned, the application code will be freshly loaded into memory.
228
- </p>
229
- <p>
230
- Raises AbstractServer::SpawnError if something went wrong.
231
- </p>
232
- </div>
233
- <div class="sourcecode">
234
- <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p>
235
- <div id="M000046_source" class="dyn-source">
236
- <pre>
237
- <span class="ruby-comment cmt"># File lib/passenger/spawn_manager.rb, line 140</span>
238
- 140: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reload</span>(<span class="ruby-identifier">app_root</span> = <span class="ruby-keyword kw">nil</span>)
239
- 141: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_root</span>
240
- 142: <span class="ruby-keyword kw">begin</span>
241
- 143: <span class="ruby-identifier">app_root</span> = <span class="ruby-identifier">normalize_path</span>(<span class="ruby-identifier">app_root</span>)
242
- 144: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ArgumentError</span>
243
- 145: <span class="ruby-keyword kw">end</span>
244
- 146: <span class="ruby-keyword kw">end</span>
245
- 147: <span class="ruby-ivar">@lock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
246
- 148: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_root</span>
247
- 149: <span class="ruby-comment cmt"># Delete associated ApplicationSpawner.</span>
248
- 150: <span class="ruby-identifier">key</span> = <span class="ruby-node">&quot;app:#{app_root}&quot;</span>
249
- 151: <span class="ruby-identifier">spawner</span> = <span class="ruby-ivar">@spawners</span>[<span class="ruby-identifier">key</span>]
250
- 152: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spawner</span>
251
- 153: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spawner</span>.<span class="ruby-identifier">started?</span>
252
- 154: <span class="ruby-identifier">spawner</span>.<span class="ruby-identifier">stop</span>
253
- 155: <span class="ruby-keyword kw">end</span>
254
- 156: <span class="ruby-ivar">@spawners</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>)
255
- 157: <span class="ruby-keyword kw">end</span>
256
- 158: <span class="ruby-keyword kw">end</span>
257
- 159: <span class="ruby-ivar">@spawners</span>.<span class="ruby-identifier">each_value</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spawner</span><span class="ruby-operator">|</span>
258
- 160: <span class="ruby-comment cmt"># Reload FrameworkSpawners.</span>
259
- 161: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spawner</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:reload</span>)
260
- 162: <span class="ruby-identifier">spawner</span>.<span class="ruby-identifier">reload</span>(<span class="ruby-identifier">app_root</span>)
261
- 163: <span class="ruby-keyword kw">end</span>
262
- 164: <span class="ruby-keyword kw">end</span>
263
- 165: <span class="ruby-keyword kw">end</span>
264
- 166: <span class="ruby-keyword kw">end</span>
265
- </pre>
266
- </div>
267
- </div>
268
- </div>
269
- <div class="method">
270
- <div class="title">
271
- <a name="M000045"></a><b>spawn_application</b>(app_root, lower_privilege = true, lowest_user = &quot;nobody&quot;, environment = &quot;production&quot;, spawn_method = &quot;smart&quot;, app_type = &quot;rails&quot;)
272
- </div>
273
- <div class="description">
274
- <p>
275
- Spawn a RoR application When successful, an <a
276
- href="Application.html">Application</a> object will be returned, which
277
- represents the spawned RoR application.
278
- </p>
279
- <p>
280
- See Railz::ApplicationSpawner.new for an explanation of the
281
- <tt>lower_privilege</tt>, <tt>lowest_user</tt> and <tt>environment</tt>
282
- parameters.
283
- </p>
284
- <p>
285
- The <tt>spawn_method</tt> argument may be one of &quot;smart&quot; or
286
- &quot;conservative&quot;. When &quot;smart&quot; is specified (the
287
- default), <a href="SpawnManager.html">SpawnManager</a> will internally
288
- cache the code of applications, in order to speed up future spawning
289
- attempts. This implies that, if you&#8216;ve changed the
290
- application&#8216;s code, you must do one of these things:
291
- </p>
292
- <ul>
293
- <li>Restart this <a href="SpawnManager.html">SpawnManager</a> by calling <a
294
- href="AbstractServer.html#M000055">AbstractServer#stop</a>, then <a
295
- href="AbstractServer.html#M000053">AbstractServer#start</a>.
296
-
297
- </li>
298
- <li>Reload the application by calling <a
299
- href="SpawnManager.html#M000046">reload</a> with the correct app_root
300
- argument.
301
-
302
- </li>
303
- </ul>
304
- <p>
305
- Caching however can be incompatible with some applications.
306
- </p>
307
- <p>
308
- The &quot;conservative&quot; spawning method does not involve any caching
309
- at all. Spawning will be slower, but is guaranteed to be compatible with
310
- all applications.
311
- </p>
312
- <p>
313
- Raises:
314
- </p>
315
- <ul>
316
- <li>ArgumentError: <tt>app_root</tt> doesn&#8216;t appear to be a valid Ruby on
317
- Rails application root.
318
-
319
- </li>
320
- <li><a href="VersionNotFound.html">VersionNotFound</a>: The Ruby on Rails
321
- framework version that the given application requires is not installed.
322
-
323
- </li>
324
- <li><a href="AbstractServer/ServerError.html">AbstractServer::ServerError</a>:
325
- One of the server processes exited unexpectedly.
326
-
327
- </li>
328
- <li><a href="FrameworkInitError.html">FrameworkInitError</a>: The Ruby on Rails
329
- framework that the application requires could not be loaded.
330
-
331
- </li>
332
- <li><a href="AppInitError.html">AppInitError</a>: The application raised an
333
- exception or called exit() during startup.
334
-
335
- </li>
336
- </ul>
337
- </div>
338
- <div class="sourcecode">
339
- <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p>
340
- <div id="M000045_source" class="dyn-source">
341
- <pre>
342
- <span class="ruby-comment cmt"># File lib/passenger/spawn_manager.rb, line 103</span>
343
- 103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application</span>(<span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">lower_privilege</span> = <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">lowest_user</span> = <span class="ruby-value str">&quot;nobody&quot;</span>,
344
- 104: <span class="ruby-identifier">environment</span> = <span class="ruby-value str">&quot;production&quot;</span>, <span class="ruby-identifier">spawn_method</span> = <span class="ruby-value str">&quot;smart&quot;</span>,
345
- 105: <span class="ruby-identifier">app_type</span> = <span class="ruby-value str">&quot;rails&quot;</span>)
346
- 106: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;rack&quot;</span>
347
- 107: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">ApplicationSpawner</span>)
348
- 108: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/rack/application_spawner'</span>
349
- 109: <span class="ruby-keyword kw">end</span>
350
- 110: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">ApplicationSpawner</span>.<span class="ruby-identifier">spawn_application</span>(<span class="ruby-identifier">app_root</span>,
351
- 111: <span class="ruby-identifier">lower_privilege</span>, <span class="ruby-identifier">lowest_user</span>, <span class="ruby-identifier">environment</span>)
352
- 112: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">app_type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;wsgi&quot;</span>
353
- 113: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/wsgi/application_spawner'</span>
354
- 114: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">WSGI</span><span class="ruby-operator">::</span><span class="ruby-constant">ApplicationSpawner</span>.<span class="ruby-identifier">spawn_application</span>(<span class="ruby-identifier">app_root</span>,
355
- 115: <span class="ruby-identifier">lower_privilege</span>, <span class="ruby-identifier">lowest_user</span>, <span class="ruby-identifier">environment</span>)
356
- 116: <span class="ruby-keyword kw">else</span>
357
- 117: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Railz</span><span class="ruby-operator">::</span><span class="ruby-constant">FrameworkSpawner</span>)
358
- 118: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/application'</span>
359
- 119: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/railz/framework_spawner'</span>
360
- 120: <span class="ruby-identifier">require</span> <span class="ruby-value str">'passenger/railz/application_spawner'</span>
361
- 121: <span class="ruby-keyword kw">end</span>
362
- 122: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">spawn_rails_application</span>(<span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">lower_privilege</span>, <span class="ruby-identifier">lowest_user</span>,
363
- 123: <span class="ruby-identifier">environment</span>, <span class="ruby-identifier">spawn_method</span>)
364
- 124: <span class="ruby-keyword kw">end</span>
365
- 125: <span class="ruby-keyword kw">end</span>
366
- </pre>
367
- </div>
368
- </div>
369
- </div>
370
- </div>
371
-
372
- </div>
373
-
374
- </body>
375
- </html>