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,494 @@
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::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 />PhusionPassenger::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/phusion_passenger/native_support_c.html">ext/phusion_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="#M000031">close_all_file_descriptors</a></li>
82
+ <li><a href="#M000030">create_unix_socket</a></li>
83
+ <li><a href="#M000032">disable_stdio_buffering</a></li>
84
+ <li><a href="#M000029">recv_fd</a></li>
85
+ <li><a href="#M000028">send_fd</a></li>
86
+ <li><a href="#M000033">split_by_null_into_hash</a></li>
87
+ <li><a href="#M000037">switch_user</a></li>
88
+ <li><a href="#M000034">writev</a></li>
89
+ <li><a href="#M000035">writev2</a></li>
90
+ <li><a href="#M000036">writev3</a></li>
91
+ </ul>
92
+
93
+
94
+
95
+ <div class="sectiontitle">Classes and Modules</div>
96
+ Class <a href="NativeSupport/FileSystemWatcher.html" class="link">PhusionPassenger::NativeSupport::FileSystemWatcher</a><br />
97
+
98
+
99
+ <div class="sectiontitle">Constants</div>
100
+ <table border='0' cellpadding='5'>
101
+ <tr valign='top'>
102
+ <td class="attr-name">UNIX_PATH_MAX</td>
103
+ <td>=</td>
104
+ <td class="attr-value">INT2NUM(sizeof(addr.sun_path))</td>
105
+ </tr>
106
+ <tr valign='top'>
107
+ <td>&nbsp;</td>
108
+ <td colspan="2" class="attr-desc">
109
+ The maximum length of a Unix socket path, including terminating null.
110
+
111
+ </td>
112
+ </tr>
113
+ <tr valign='top'>
114
+ <td class="attr-name">SSIZE_MAX</td>
115
+ <td>=</td>
116
+ <td class="attr-value">LL2NUM(SSIZE_MAX)</td>
117
+ </tr>
118
+ <tr valign='top'>
119
+ <td>&nbsp;</td>
120
+ <td colspan="2" class="attr-desc">
121
+ The maximum size of the data that may be passed to <a
122
+ href="NativeSupport.html#M000034">#writev</a>.
123
+
124
+ </td>
125
+ </tr>
126
+ </table>
127
+
128
+
129
+ <div class="sectiontitle">Public Class methods</div>
130
+ <div class="method">
131
+ <div class="title">
132
+ <a name="M000031"></a><b> close_all_file_descriptors(exceptions)<br />
133
+ </b>
134
+ </div>
135
+ <div class="description">
136
+ <p>
137
+ Close all file descriptors, except those given in the <tt>exceptions</tt>
138
+ array. For example, the following would close all file descriptors except
139
+ standard input (0) and standard output (1).
140
+ </p>
141
+ <pre>
142
+ close_all_file_descriptors([0, 1])
143
+ </pre>
144
+ </div>
145
+ <div class="sourcecode">
146
+ <p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p>
147
+ <div id="M000031_source" class="dyn-source">
148
+ <pre>
149
+ /*
150
+ * call-seq: close_all_file_descriptors(exceptions)
151
+ *
152
+ * Close all file descriptors, except those given in the +exceptions+ array.
153
+ * For example, the following would close all file descriptors except standard
154
+ * input (0) and standard output (1).
155
+ *
156
+ * close_all_file_descriptors([0, 1])
157
+ */
158
+ static VALUE
159
+ close_all_file_descriptors(VALUE self, VALUE exceptions) {
160
+
161
+ </pre>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ <div class="method">
166
+ <div class="title">
167
+ <a name="M000030"></a><b> create_unix_socket(filename, backlog)<br />
168
+ </b>
169
+ </div>
170
+ <div class="description">
171
+ <p>
172
+ Create a SOCK_STREAM server Unix socket. Unlike Ruby&#8216;s UNIXServer
173
+ class, this function is also able to create Unix sockets on the abstract
174
+ namespace by prepending the filename with a null byte.
175
+ </p>
176
+ <ul>
177
+ <li><tt>filename</tt> (string): The filename of the Unix socket to create.
178
+
179
+ </li>
180
+ <li><tt>backlog</tt> (integer): The backlog to use for listening on the socket.
181
+
182
+ </li>
183
+ <li>Returns: The file descriptor of the created Unix socket, as an integer.
184
+
185
+ </li>
186
+ <li>Raises <tt>SystemCallError</tt> if something went wrong.
187
+
188
+ </li>
189
+ </ul>
190
+ </div>
191
+ <div class="sourcecode">
192
+ <p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p>
193
+ <div id="M000030_source" class="dyn-source">
194
+ <pre>
195
+ /*
196
+ * call-seq: create_unix_socket(filename, backlog)
197
+ *
198
+ * Create a SOCK_STREAM server Unix socket. Unlike Ruby's UNIXServer class,
199
+ * this function is also able to create Unix sockets on the abstract namespace
200
+ * by prepending the filename with a null byte.
201
+ *
202
+ * - +filename+ (string): The filename of the Unix socket to create.
203
+ * - +backlog+ (integer): The backlog to use for listening on the socket.
204
+ * - Returns: The file descriptor of the created Unix socket, as an integer.
205
+ * - Raises +SystemCallError+ if something went wrong.
206
+ */
207
+ static VALUE
208
+ create_unix_socket(VALUE self, VALUE filename, VALUE backlog) {
209
+
210
+ </pre>
211
+ </div>
212
+ </div>
213
+ </div>
214
+ <div class="method">
215
+ <div class="title">
216
+ <a name="M000032"></a><b> disable_stdio_buffering<br />
217
+ </b>
218
+ </div>
219
+ <div class="description">
220
+ <p>
221
+ Disables any kind of buffering on the C <tt>stdout</tt> and <tt>stderr</tt>
222
+ variables, so that +fprintf()+ on <tt>stdout</tt> and <tt>stderr</tt> have
223
+ immediate effect.
224
+ </p>
225
+ </div>
226
+ <div class="sourcecode">
227
+ <p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p>
228
+ <div id="M000032_source" class="dyn-source">
229
+ <pre>
230
+ /*
231
+ * call-seq: disable_stdio_buffering
232
+ *
233
+ * Disables any kind of buffering on the C +stdout+ and +stderr+ variables,
234
+ * so that +fprintf()+ on +stdout+ and +stderr+ have immediate effect.
235
+ */
236
+ static VALUE
237
+ disable_stdio_buffering(VALUE self) {
238
+
239
+ </pre>
240
+ </div>
241
+ </div>
242
+ </div>
243
+ <div class="method">
244
+ <div class="title">
245
+ <a name="M000029"></a><b> recv_fd(socket_fd)<br />
246
+ </b>
247
+ </div>
248
+ <div class="description">
249
+ <p>
250
+ Receive a file descriptor from the given Unix socket. Returns the received
251
+ file descriptor as an integer. Raises <tt>SystemCallError</tt> if something
252
+ went wrong.
253
+ </p>
254
+ <p>
255
+ You do not have call this method directly. A convenience wrapper is
256
+ provided by IO#recv_io.
257
+ </p>
258
+ </div>
259
+ <div class="sourcecode">
260
+ <p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p>
261
+ <div id="M000029_source" class="dyn-source">
262
+ <pre>
263
+ /*
264
+ * call-seq: recv_fd(socket_fd)
265
+ *
266
+ * Receive a file descriptor from the given Unix socket. Returns the received
267
+ * file descriptor as an integer. Raises +SystemCallError+ if something went
268
+ * wrong.
269
+ *
270
+ * You do not have call this method directly. A convenience wrapper is
271
+ * provided by IO#recv_io.
272
+ */
273
+ static VALUE
274
+ recv_fd(VALUE self, VALUE socket_fd) {
275
+
276
+ </pre>
277
+ </div>
278
+ </div>
279
+ </div>
280
+ <div class="method">
281
+ <div class="title">
282
+ <a name="M000028"></a><b> send_fd(socket_fd, fd_to_send)<br />
283
+ </b>
284
+ </div>
285
+ <div class="description">
286
+ <p>
287
+ Send a file descriptor over the given Unix socket. You do not have to call
288
+ this function directly. A convenience wrapper is provided by IO#send_io.
289
+ </p>
290
+ <ul>
291
+ <li><tt>socket_fd</tt> (integer): The file descriptor of the socket.
292
+
293
+ </li>
294
+ <li><tt>fd_to_send</tt> (integer): The file descriptor to send.
295
+
296
+ </li>
297
+ <li>Raises <tt>SystemCallError</tt> if something went wrong.
298
+
299
+ </li>
300
+ </ul>
301
+ </div>
302
+ <div class="sourcecode">
303
+ <p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p>
304
+ <div id="M000028_source" class="dyn-source">
305
+ <pre>
306
+ /*
307
+ * call-seq: send_fd(socket_fd, fd_to_send)
308
+ *
309
+ * Send a file descriptor over the given Unix socket. You do not have to call
310
+ * this function directly. A convenience wrapper is provided by IO#send_io.
311
+ *
312
+ * - +socket_fd+ (integer): The file descriptor of the socket.
313
+ * - +fd_to_send+ (integer): The file descriptor to send.
314
+ * - Raises +SystemCallError+ if something went wrong.
315
+ */
316
+ static VALUE
317
+ send_fd(VALUE self, VALUE socket_fd, VALUE fd_to_send) {
318
+
319
+ </pre>
320
+ </div>
321
+ </div>
322
+ </div>
323
+ <div class="method">
324
+ <div class="title">
325
+ <a name="M000033"></a><b>split_by_null_into_hash</b>(p1)
326
+ </div>
327
+ <div class="description">
328
+ <p>
329
+ Split the given string into an hash. Keys and values are obtained by
330
+ splitting the string using the null character as the delimitor.
331
+ </p>
332
+ </div>
333
+ <div class="sourcecode">
334
+ <p class="source-link">[ <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show source</a> ]</p>
335
+ <div id="M000033_source" class="dyn-source">
336
+ <pre>
337
+ /**
338
+ * Split the given string into an hash. Keys and values are obtained by splitting the
339
+ * string using the null character as the delimitor.
340
+ */
341
+ static VALUE
342
+ split_by_null_into_hash(VALUE self, VALUE data) {
343
+
344
+ </pre>
345
+ </div>
346
+ </div>
347
+ </div>
348
+ <div class="method">
349
+ <div class="title">
350
+ <a name="M000037"></a><b>switch_user</b>(p1, p2, p3)
351
+ </div>
352
+ <div class="description">
353
+ <p>
354
+ Ruby&#8216;s implementations of initgroups, setgid and setuid are broken
355
+ various ways, sigh&#8230; Ruby&#8216;s setgid and setuid can&#8216;t handle
356
+ negative UIDs and initgroups is just broken. Work around it by using our
357
+ own implementation.
358
+ </p>
359
+ </div>
360
+ <div class="sourcecode">
361
+ <p class="source-link">[ <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show source</a> ]</p>
362
+ <div id="M000037_source" class="dyn-source">
363
+ <pre>
364
+ /**
365
+ * Ruby's implementations of initgroups, setgid and setuid are broken various ways,
366
+ * sigh...
367
+ * Ruby's setgid and setuid can't handle negative UIDs and initgroups is just broken.
368
+ * Work around it by using our own implementation.
369
+ */
370
+ static VALUE
371
+ switch_user(VALUE self, VALUE username, VALUE uid, VALUE gid) {
372
+
373
+ </pre>
374
+ </div>
375
+ </div>
376
+ </div>
377
+ <div class="method">
378
+ <div class="title">
379
+ <a name="M000034"></a><b>writev</b>(p1, p2)
380
+ </div>
381
+ <div class="description">
382
+ <p>
383
+ Writes all of the strings in the <tt>components</tt> array into the given
384
+ file descriptor using the +<a
385
+ href="NativeSupport.html#M000034">writev</a>()+ system call. Unlike
386
+ IO#write, this method does not require one to concatenate all those strings
387
+ into a single buffer in order to send the data in a single system call.
388
+ Thus, <a href="NativeSupport.html#M000034">#writev</a> is a great way to
389
+ perform zero-copy I/O.
390
+ </p>
391
+ <p>
392
+ Unlike the raw <a href="NativeSupport.html#M000034">writev</a>() system
393
+ call, this method ensures that all given data is written before returning,
394
+ by performing multiple <a href="NativeSupport.html#M000034">writev</a>()
395
+ calls and whatever else is necessary.
396
+ </p>
397
+ <pre>
398
+ writev(@socket.fileno, [&quot;hello &quot;, &quot;world&quot;, &quot;\n&quot;])
399
+ </pre>
400
+ </div>
401
+ <div class="sourcecode">
402
+ <p class="source-link">[ <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show source</a> ]</p>
403
+ <div id="M000034_source" class="dyn-source">
404
+ <pre>
405
+ /**
406
+ * Writes all of the strings in the +components+ array into the given file
407
+ * descriptor using the +writev()+ system call. Unlike IO#write, this method
408
+ * does not require one to concatenate all those strings into a single buffer
409
+ * in order to send the data in a single system call. Thus, #writev is a great
410
+ * way to perform zero-copy I/O.
411
+ *
412
+ * Unlike the raw writev() system call, this method ensures that all given
413
+ * data is written before returning, by performing multiple writev() calls
414
+ * and whatever else is necessary.
415
+ *
416
+ * writev(@socket.fileno, [&quot;hello &quot;, &quot;world&quot;, &quot;\n&quot;])
417
+ */
418
+ static VALUE
419
+ f_writev(VALUE self, VALUE fd, VALUE components) {
420
+
421
+ </pre>
422
+ </div>
423
+ </div>
424
+ </div>
425
+ <div class="method">
426
+ <div class="title">
427
+ <a name="M000035"></a><b>writev2</b>(p1, p2, p3)
428
+ </div>
429
+ <div class="description">
430
+ <p>
431
+ Like <a href="NativeSupport.html#M000034">#writev</a>, but accepts two
432
+ arrays. The data is written in the given order.
433
+ </p>
434
+ <pre>
435
+ writev2(@socket.fileno, [&quot;hello &quot;, &quot;world&quot;, &quot;\n&quot;], [&quot;another &quot;, &quot;message\n&quot;])
436
+ </pre>
437
+ </div>
438
+ <div class="sourcecode">
439
+ <p class="source-link">[ <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show source</a> ]</p>
440
+ <div id="M000035_source" class="dyn-source">
441
+ <pre>
442
+ /**
443
+ * Like #writev, but accepts two arrays. The data is written in the given order.
444
+ *
445
+ * writev2(@socket.fileno, [&quot;hello &quot;, &quot;world&quot;, &quot;\n&quot;], [&quot;another &quot;, &quot;message\n&quot;])
446
+ */
447
+ static VALUE
448
+ f_writev2(VALUE self, VALUE fd, VALUE components1, VALUE components2) {
449
+
450
+ </pre>
451
+ </div>
452
+ </div>
453
+ </div>
454
+ <div class="method">
455
+ <div class="title">
456
+ <a name="M000036"></a><b>writev3</b>(p1, p2, p3, p4)
457
+ </div>
458
+ <div class="description">
459
+ <p>
460
+ Like <a href="NativeSupport.html#M000034">#writev</a>, but accepts three
461
+ arrays. The data is written in the given order.
462
+ </p>
463
+ <pre>
464
+ writev3(@socket.fileno,
465
+ [&quot;hello &quot;, &quot;world&quot;, &quot;\n&quot;],
466
+ [&quot;another &quot;, &quot;message\n&quot;],
467
+ [&quot;yet &quot;, &quot;another &quot;, &quot;one&quot;, &quot;\n&quot;])
468
+ </pre>
469
+ </div>
470
+ <div class="sourcecode">
471
+ <p class="source-link">[ <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show source</a> ]</p>
472
+ <div id="M000036_source" class="dyn-source">
473
+ <pre>
474
+ /**
475
+ * Like #writev, but accepts three arrays. The data is written in the given order.
476
+ *
477
+ * writev3(@socket.fileno,
478
+ * [&quot;hello &quot;, &quot;world&quot;, &quot;\n&quot;],
479
+ * [&quot;another &quot;, &quot;message\n&quot;],
480
+ * [&quot;yet &quot;, &quot;another &quot;, &quot;one&quot;, &quot;\n&quot;])
481
+ */
482
+ static VALUE
483
+ f_writev3(VALUE self, VALUE fd, VALUE components1, VALUE components2, VALUE components3) {
484
+
485
+ </pre>
486
+ </div>
487
+ </div>
488
+ </div>
489
+ </div>
490
+
491
+ </div>
492
+
493
+ </body>
494
+ </html>