passenger 6.1.8 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (662) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +56 -2
  3. data/CONTRIBUTING.md +7 -311
  4. data/CONTRIBUTORS +1 -0
  5. data/LICENSE +1 -1
  6. data/README.md +2 -2
  7. data/Rakefile +1 -1
  8. data/bin/passenger +1 -1
  9. data/bin/passenger-config +1 -1
  10. data/bin/passenger-install-apache2-module +1 -1
  11. data/bin/passenger-install-nginx-module +4 -9
  12. data/bin/passenger-memory-stats +1 -1
  13. data/bin/passenger-status +1 -1
  14. data/build/agent.rb +13 -15
  15. data/build/apache2.rb +13 -16
  16. data/build/basics.rb +10 -13
  17. data/build/common_library.rb +5 -9
  18. data/build/cxx_tests.rb +40 -12
  19. data/build/integration_tests.rb +5 -2
  20. data/build/misc.rb +1 -1
  21. data/build/nginx.rb +1 -1
  22. data/build/node_tests.rb +1 -1
  23. data/build/oxt_tests.rb +6 -8
  24. data/build/packaging.rb +1 -1
  25. data/build/ruby_extension.rb +1 -1
  26. data/build/ruby_tests.rb +1 -1
  27. data/build/schema_printer.rb +13 -15
  28. data/build/support/cplusplus.rb +61 -69
  29. data/build/support/cxx_dependency_map.rb +1488 -666
  30. data/build/support/general.rb +1 -1
  31. data/build/support/vendor/cxx_hinted_parser/LICENSE.md +1 -1
  32. data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser/parser.rb +3 -1
  33. data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser.rb +1 -1
  34. data/build/support/vendor/cxxcodebuilder/LICENSE.md +1 -1
  35. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +3 -1
  36. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/initializer_builder.rb +3 -1
  37. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder.rb +1 -1
  38. data/build/test_basics.rb +1 -1
  39. data/dev/copy_boost_headers +1 -1
  40. data/dev/index_cxx_dependencies.rb +6 -2
  41. data/dev/libev-changes.patch +108 -0
  42. data/dev/nginx_version_sha256 +1 -1
  43. data/dev/ruby_server.rb +1 -6
  44. data/dev/runner +2 -0
  45. data/dev/upgrading_libuv.sh +16 -0
  46. data/doc/BasicArchitectureOverview.md +55 -0
  47. data/doc/BuildCaching.md +23 -0
  48. data/doc/BuildSystem.md +49 -0
  49. data/doc/DebuggingAndStressTesting.md +2 -0
  50. data/doc/DesignAspects/LimitedGemDependencies.md +1 -0
  51. data/doc/DevEnvironmentSetup.md +46 -0
  52. data/doc/DevHandbook.md +28 -0
  53. data/doc/Packaging.md +1 -1
  54. data/doc/RunningTests.md +88 -0
  55. data/doc/{TempFileHandling.md → SecureTempFileHandling.md} +1 -1
  56. data/doc/{CxxTestingGuide.md → WritingCxxTests.md} +1 -20
  57. data/src/agent/AgentMain.cpp +1 -1
  58. data/src/agent/Core/ApiServer.h +1 -1
  59. data/src/agent/Core/ApplicationPool/AbstractSession.h +1 -1
  60. data/src/agent/Core/ApplicationPool/BasicGroupInfo.h +1 -1
  61. data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +1 -1
  62. data/src/agent/Core/ApplicationPool/Common.h +1 -1
  63. data/src/agent/Core/ApplicationPool/Context.h +1 -1
  64. data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +1 -1
  65. data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +1 -1
  66. data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +1 -1
  67. data/src/agent/Core/ApplicationPool/Group/Miscellaneous.cpp +1 -1
  68. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +1 -1
  69. data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +1 -1
  70. data/src/agent/Core/ApplicationPool/Group/SessionManagement.cpp +1 -1
  71. data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +1 -1
  72. data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +1 -1
  73. data/src/agent/Core/ApplicationPool/Group/Verification.cpp +1 -1
  74. data/src/agent/Core/ApplicationPool/Group.h +1 -1
  75. data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -1
  76. data/src/agent/Core/ApplicationPool/Options.h +1 -1
  77. data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +1 -1
  78. data/src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +1 -1
  79. data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +1 -1
  80. data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +1 -1
  81. data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +1 -1
  82. data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +1 -1
  83. data/src/agent/Core/ApplicationPool/Pool/ProcessUtils.cpp +1 -1
  84. data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +1 -1
  85. data/src/agent/Core/ApplicationPool/Pool.h +1 -1
  86. data/src/agent/Core/ApplicationPool/Process.cpp +1 -1
  87. data/src/agent/Core/ApplicationPool/Process.h +1 -1
  88. data/src/agent/Core/ApplicationPool/Session.h +1 -1
  89. data/src/agent/Core/ApplicationPool/Socket.h +1 -1
  90. data/src/agent/Core/ApplicationPool/TestSession.h +1 -1
  91. data/src/agent/Core/Config.h +3 -2
  92. data/src/agent/Core/ConfigChange.cpp +1 -1
  93. data/src/agent/Core/ConfigChange.h +1 -1
  94. data/src/agent/Core/Controller/AppResponse.h +1 -1
  95. data/src/agent/Core/Controller/BufferBody.cpp +1 -1
  96. data/src/agent/Core/Controller/CheckoutSession.cpp +8 -5
  97. data/src/agent/Core/Controller/Client.h +1 -1
  98. data/src/agent/Core/Controller/Config.cpp +1 -1
  99. data/src/agent/Core/Controller/Config.h +2 -2
  100. data/src/agent/Core/Controller/ForwardResponse.cpp +2 -2
  101. data/src/agent/Core/Controller/Hooks.cpp +12 -9
  102. data/src/agent/Core/Controller/Implementation.cpp +1 -1
  103. data/src/agent/Core/Controller/InitRequest.cpp +1 -1
  104. data/src/agent/Core/Controller/InitializationAndShutdown.cpp +1 -1
  105. data/src/agent/Core/Controller/InternalUtils.cpp +1 -1
  106. data/src/agent/Core/Controller/Miscellaneous.cpp +1 -1
  107. data/src/agent/Core/Controller/Request.h +1 -1
  108. data/src/agent/Core/Controller/SendRequest.cpp +1 -1
  109. data/src/agent/Core/Controller/StateInspection.cpp +1 -1
  110. data/src/agent/Core/Controller/TurboCaching.h +1 -1
  111. data/src/agent/Core/Controller.h +1 -1
  112. data/src/agent/Core/CoreMain.cpp +1 -1
  113. data/src/agent/Core/OptionParser.h +1 -1
  114. data/src/agent/Core/ResponseCache.h +1 -1
  115. data/src/agent/Core/SecurityUpdateChecker.h +1 -1
  116. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +1 -1
  117. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h.cxxcodebuilder +1 -1
  118. data/src/agent/Core/SpawningKit/Config.h +1 -1
  119. data/src/agent/Core/SpawningKit/Context.h +1 -1
  120. data/src/agent/Core/SpawningKit/DirectSpawner.h +1 -1
  121. data/src/agent/Core/SpawningKit/DummySpawner.h +1 -1
  122. data/src/agent/Core/SpawningKit/ErrorRenderer.h +1 -1
  123. data/src/agent/Core/SpawningKit/Exceptions.h +63 -2
  124. data/src/agent/Core/SpawningKit/Factory.h +1 -1
  125. data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +1 -1
  126. data/src/agent/Core/SpawningKit/Handshake/Perform.h +3 -2
  127. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +1 -1
  128. data/src/agent/Core/SpawningKit/Handshake/Session.h +1 -1
  129. data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +1 -1
  130. data/src/agent/Core/SpawningKit/Journey.h +1 -1
  131. data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
  132. data/src/agent/Core/SpawningKit/README.md +3 -3
  133. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +1 -1
  134. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h.cxxcodebuilder +1 -1
  135. data/src/agent/Core/SpawningKit/Result.h +1 -1
  136. data/src/agent/Core/SpawningKit/SmartSpawner.h +17 -17
  137. data/src/agent/Core/SpawningKit/Spawner.h +1 -1
  138. data/src/agent/Core/SpawningKit/UserSwitchingRules.h +1 -1
  139. data/src/agent/Core/TelemetryCollector.h +1 -1
  140. data/src/agent/ExecHelper/ExecHelperMain.cpp +1 -1
  141. data/src/agent/FileReadHelper/FileReadHelperMain.cpp +1 -1
  142. data/src/agent/MainFunctions.h +1 -1
  143. data/src/agent/Shared/ApiAccountUtils.h +4 -3
  144. data/src/agent/Shared/ApiServerUtils.h +15 -11
  145. data/src/agent/Shared/ApplicationPoolApiKey.h +1 -1
  146. data/src/agent/Shared/Fundamentals/AbortHandler.cpp +1 -1
  147. data/src/agent/Shared/Fundamentals/AbortHandler.h +1 -1
  148. data/src/agent/Shared/Fundamentals/Initialization.cpp +1 -1
  149. data/src/agent/Shared/Fundamentals/Initialization.h +1 -1
  150. data/src/agent/Shared/Fundamentals/Utils.cpp +1 -1
  151. data/src/agent/Shared/Fundamentals/Utils.h +1 -1
  152. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +1 -1
  153. data/src/agent/SystemMetrics/SystemMetricsMain.cpp +1 -1
  154. data/src/agent/TempDirToucher/TempDirToucherMain.cpp +1 -1
  155. data/src/agent/Watchdog/{AgentWatcher.cpp → AgentWatcher.h} +28 -1
  156. data/src/agent/Watchdog/ApiServer.h +25 -1
  157. data/src/agent/Watchdog/Config.h +2 -2
  158. data/src/agent/Watchdog/{CoreWatcher.cpp → CoreWatcher.h} +18 -1
  159. data/src/agent/Watchdog/{InstanceDirToucher.cpp → InstanceDirToucher.h} +20 -1
  160. data/src/agent/Watchdog/WatchdogMain.cpp +11 -77
  161. data/src/agent/Watchdog/WorkingObjects.h +108 -0
  162. data/src/apache2_module/Bucket.cpp +1 -1
  163. data/src/apache2_module/Bucket.h +1 -1
  164. data/src/apache2_module/CBindings.cpp +1 -1
  165. data/src/apache2_module/Config.cpp +1 -1
  166. data/src/apache2_module/Config.h +1 -1
  167. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +104 -104
  168. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder +2 -2
  169. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +1 -1
  170. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp.cxxcodebuilder +1 -1
  171. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +1 -1
  172. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +1 -1
  173. data/src/apache2_module/ConfigGeneral/Common.h +1 -1
  174. data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +1 -1
  175. data/src/apache2_module/ConfigGeneral/SetterFuncs.h +1 -1
  176. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +1 -1
  177. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder +1 -1
  178. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +1 -1
  179. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder +1 -1
  180. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +1 -1
  181. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +1 -1
  182. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +1 -1
  183. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +1 -1
  184. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +1 -1
  185. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
  186. data/src/apache2_module/DirectoryMapper.h +1 -1
  187. data/src/apache2_module/Hooks.cpp +8 -2
  188. data/src/apache2_module/Hooks.h +1 -1
  189. data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +1 -1
  190. data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +1 -1
  191. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +1 -1
  192. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
  193. data/src/apache2_module/Utils.h +1 -1
  194. data/src/apache2_module/mod_passenger.c +1 -1
  195. data/src/cxx_supportlib/Algorithms/Hasher.cpp +1 -1
  196. data/src/cxx_supportlib/Algorithms/Hasher.h +1 -1
  197. data/src/cxx_supportlib/Algorithms/MovingAverage.h +1 -1
  198. data/src/cxx_supportlib/AppLocalConfigFileUtils.h +1 -1
  199. data/src/cxx_supportlib/AppTypeDetector/CBindings.cpp +1 -1
  200. data/src/cxx_supportlib/AppTypeDetector/CBindings.h +1 -1
  201. data/src/cxx_supportlib/AppTypeDetector/Detector.h +1 -1
  202. data/src/cxx_supportlib/BackgroundEventLoop.cpp +1 -1
  203. data/src/cxx_supportlib/BackgroundEventLoop.h +1 -1
  204. data/src/cxx_supportlib/ConfigKit/AsyncUtils.h +1 -1
  205. data/src/cxx_supportlib/ConfigKit/Common.h +1 -1
  206. data/src/cxx_supportlib/ConfigKit/ConfigKit.h +1 -1
  207. data/src/cxx_supportlib/ConfigKit/DummyTranslator.h +1 -1
  208. data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +1 -3
  209. data/src/cxx_supportlib/ConfigKit/PrefixTranslator.h +3 -3
  210. data/src/cxx_supportlib/ConfigKit/Schema.h +1 -1
  211. data/src/cxx_supportlib/ConfigKit/SchemaUtils.h +1 -1
  212. data/src/cxx_supportlib/ConfigKit/Store.h +1 -1
  213. data/src/cxx_supportlib/ConfigKit/SubComponentUtils.h +1 -1
  214. data/src/cxx_supportlib/ConfigKit/TableTranslator.h +1 -1
  215. data/src/cxx_supportlib/ConfigKit/Translator.h +1 -1
  216. data/src/cxx_supportlib/ConfigKit/Utils.h +1 -1
  217. data/src/cxx_supportlib/Constants.h +2 -2
  218. data/src/cxx_supportlib/Constants.h.cxxcodebuilder +1 -1
  219. data/src/cxx_supportlib/DataStructures/HashedStaticString.h +1 -1
  220. data/src/cxx_supportlib/DataStructures/LString.cpp +1 -1
  221. data/src/cxx_supportlib/DataStructures/LString.h +1 -1
  222. data/src/cxx_supportlib/DataStructures/StringKeyTable.h +1 -1
  223. data/src/cxx_supportlib/DataStructures/StringMap.h +1 -1
  224. data/src/cxx_supportlib/Exceptions.cpp +1 -1
  225. data/src/cxx_supportlib/Exceptions.h +1 -1
  226. data/src/cxx_supportlib/FileDescriptor.h +1 -1
  227. data/src/cxx_supportlib/FileTools/FileManip.cpp +1 -1
  228. data/src/cxx_supportlib/FileTools/FileManip.h +1 -1
  229. data/src/cxx_supportlib/FileTools/PathManip.cpp +1 -1
  230. data/src/cxx_supportlib/FileTools/PathManip.h +1 -1
  231. data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +1 -1
  232. data/src/cxx_supportlib/FileTools/PathManipCBindings.h +1 -1
  233. data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +1 -1
  234. data/src/cxx_supportlib/FileTools/PathSecurityCheck.h +1 -1
  235. data/src/cxx_supportlib/Hooks.h +1 -1
  236. data/src/cxx_supportlib/IOTools/BufferedIO.h +1 -1
  237. data/src/cxx_supportlib/IOTools/IOUtils.cpp +12 -27
  238. data/src/cxx_supportlib/IOTools/IOUtils.h +1 -1
  239. data/src/cxx_supportlib/IOTools/MessageIO.h +1 -1
  240. data/src/cxx_supportlib/IOTools/MessageSerialization.h +1 -1
  241. data/src/cxx_supportlib/InstanceDirectory.h +1 -1
  242. data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +1 -1
  243. data/src/cxx_supportlib/JsonTools/Autocast.h +1 -1
  244. data/src/cxx_supportlib/JsonTools/CBindings.cpp +1 -1
  245. data/src/cxx_supportlib/JsonTools/CBindings.h +1 -1
  246. data/src/cxx_supportlib/JsonTools/JsonUtils.h +1 -1
  247. data/src/cxx_supportlib/LoggingKit/Assert.h +1 -1
  248. data/src/cxx_supportlib/LoggingKit/Config.h +2 -1
  249. data/src/cxx_supportlib/LoggingKit/Context.h +1 -1
  250. data/src/cxx_supportlib/LoggingKit/Forward.h +1 -1
  251. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +11 -1
  252. data/src/cxx_supportlib/LoggingKit/Logging.h +1 -1
  253. data/src/cxx_supportlib/LoggingKit/LoggingKit.h +1 -1
  254. data/src/cxx_supportlib/LveLoggingDecorator.h +1 -1
  255. data/src/cxx_supportlib/MemoryKit/mbuf.cpp +1 -1
  256. data/src/cxx_supportlib/MemoryKit/mbuf.h +1 -1
  257. data/src/cxx_supportlib/MemoryKit/palloc.cpp +1 -1
  258. data/src/cxx_supportlib/MemoryKit/palloc.h +1 -1
  259. data/src/cxx_supportlib/ProcessManagement/Ruby.cpp +1 -1
  260. data/src/cxx_supportlib/ProcessManagement/Ruby.h +1 -1
  261. data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +1 -1
  262. data/src/cxx_supportlib/ProcessManagement/Spawn.h +1 -1
  263. data/src/cxx_supportlib/ProcessManagement/Utils.cpp +1 -1
  264. data/src/cxx_supportlib/ProcessManagement/Utils.h +1 -1
  265. data/src/cxx_supportlib/RandomGenerator.h +1 -1
  266. data/src/cxx_supportlib/ResourceLocator.h +1 -1
  267. data/src/cxx_supportlib/SafeLibev.h +1 -1
  268. data/src/cxx_supportlib/SecurityKit/Crypto.cpp +9 -27
  269. data/src/cxx_supportlib/SecurityKit/Crypto.h +2 -2
  270. data/src/cxx_supportlib/SecurityKit/MemZeroGuard.h +1 -1
  271. data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +4 -1
  272. data/src/cxx_supportlib/ServerKit/Channel.h +1 -1
  273. data/src/cxx_supportlib/ServerKit/Client.h +1 -1
  274. data/src/cxx_supportlib/ServerKit/ClientRef.h +1 -1
  275. data/src/cxx_supportlib/ServerKit/Config.h +1 -1
  276. data/src/cxx_supportlib/ServerKit/Context.h +1 -1
  277. data/src/cxx_supportlib/ServerKit/CookieUtils.h +1 -1
  278. data/src/cxx_supportlib/ServerKit/Errors.h +1 -1
  279. data/src/cxx_supportlib/ServerKit/FdSinkChannel.h +1 -1
  280. data/src/cxx_supportlib/ServerKit/FdSourceChannel.h +1 -1
  281. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +54 -2
  282. data/src/cxx_supportlib/ServerKit/FileBufferedFdSinkChannel.h +1 -1
  283. data/src/cxx_supportlib/ServerKit/HeaderTable.h +1 -1
  284. data/src/cxx_supportlib/ServerKit/Hooks.h +1 -1
  285. data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParser.h +1 -1
  286. data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParserState.h +1 -1
  287. data/src/cxx_supportlib/ServerKit/HttpClient.h +1 -1
  288. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +1 -1
  289. data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +1 -1
  290. data/src/cxx_supportlib/ServerKit/HttpRequest.h +1 -1
  291. data/src/cxx_supportlib/ServerKit/HttpRequestRef.h +1 -1
  292. data/src/cxx_supportlib/ServerKit/HttpServer.h +1 -1
  293. data/src/cxx_supportlib/ServerKit/Implementation.cpp +1 -1
  294. data/src/cxx_supportlib/ServerKit/Server.h +8 -23
  295. data/src/cxx_supportlib/StaticString.h +1 -1
  296. data/src/cxx_supportlib/StrIntTools/DateParsing.h +1 -1
  297. data/src/cxx_supportlib/StrIntTools/StrIntUtils.cpp +1 -1
  298. data/src/cxx_supportlib/StrIntTools/StrIntUtils.h +1 -1
  299. data/src/cxx_supportlib/StrIntTools/StrIntUtilsNoStrictAliasing.cpp +1 -1
  300. data/src/cxx_supportlib/StrIntTools/StringScanning.h +1 -1
  301. data/src/cxx_supportlib/StrIntTools/Template.h +1 -1
  302. data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +1 -1
  303. data/src/cxx_supportlib/SystemTools/ProcessMetricsCollector.h +1 -1
  304. data/src/cxx_supportlib/SystemTools/SystemMetricsCollector.h +1 -1
  305. data/src/cxx_supportlib/SystemTools/SystemTime.cpp +1 -1
  306. data/src/cxx_supportlib/SystemTools/SystemTime.h +1 -1
  307. data/src/cxx_supportlib/SystemTools/UserDatabase.cpp +1 -1
  308. data/src/cxx_supportlib/SystemTools/UserDatabase.h +1 -1
  309. data/src/cxx_supportlib/Utils/AnsiColorConstants.h +1 -1
  310. data/src/cxx_supportlib/Utils/AsyncSignalSafeUtils.h +1 -1
  311. data/src/cxx_supportlib/Utils/BlockingQueue.h +1 -1
  312. data/src/cxx_supportlib/Utils/CachedFileStat.cpp +1 -1
  313. data/src/cxx_supportlib/Utils/CachedFileStat.h +1 -1
  314. data/src/cxx_supportlib/Utils/CachedFileStat.hpp +1 -1
  315. data/src/cxx_supportlib/Utils/ClassUtils.h +1 -1
  316. data/src/cxx_supportlib/Utils/Curl.h +1 -1
  317. data/src/cxx_supportlib/Utils/FastStringStream.h +1 -1
  318. data/src/cxx_supportlib/Utils/FileChangeChecker.h +1 -1
  319. data/src/cxx_supportlib/Utils/HttpConstants.h +1 -1
  320. data/src/cxx_supportlib/Utils/IniFile.h +1 -1
  321. data/src/cxx_supportlib/Utils/MessagePassing.h +1 -1
  322. data/src/cxx_supportlib/Utils/OptionParsing.h +1 -1
  323. data/src/cxx_supportlib/Utils/ReleaseableScopedPointer.h +1 -1
  324. data/src/cxx_supportlib/Utils/ScopeGuard.h +1 -1
  325. data/src/cxx_supportlib/Utils/Socket.cpp +67 -0
  326. data/src/cxx_supportlib/Utils/Socket.h +35 -0
  327. data/src/cxx_supportlib/Utils/SpeedMeter.h +1 -1
  328. data/src/cxx_supportlib/Utils/Timer.h +1 -1
  329. data/src/cxx_supportlib/Utils/VariantMap.h +1 -1
  330. data/src/cxx_supportlib/Utils.cpp +1 -1
  331. data/src/cxx_supportlib/Utils.h +1 -1
  332. data/src/cxx_supportlib/WatchdogLauncher.cpp +1 -1
  333. data/src/cxx_supportlib/WatchdogLauncher.h +1 -1
  334. data/src/cxx_supportlib/WrapperRegistry/CBindings.cpp +1 -1
  335. data/src/cxx_supportlib/WrapperRegistry/CBindings.h +1 -1
  336. data/src/cxx_supportlib/WrapperRegistry/Entry.h +1 -1
  337. data/src/cxx_supportlib/WrapperRegistry/Registry.h +1 -1
  338. data/src/cxx_supportlib/oxt/backtrace.hpp +1 -1
  339. data/src/cxx_supportlib/oxt/detail/backtrace_disabled.hpp +1 -1
  340. data/src/cxx_supportlib/oxt/detail/backtrace_enabled.hpp +1 -1
  341. data/src/cxx_supportlib/oxt/detail/context.hpp +1 -1
  342. data/src/cxx_supportlib/oxt/detail/tracable_exception_disabled.hpp +1 -1
  343. data/src/cxx_supportlib/oxt/detail/tracable_exception_enabled.hpp +1 -1
  344. data/src/cxx_supportlib/oxt/dynamic_thread_group.hpp +1 -1
  345. data/src/cxx_supportlib/oxt/implementation.cpp +1 -1
  346. data/src/cxx_supportlib/oxt/initialize.hpp +1 -1
  347. data/src/cxx_supportlib/oxt/macros.hpp +1 -1
  348. data/src/cxx_supportlib/oxt/spin_lock.hpp +1 -1
  349. data/src/cxx_supportlib/oxt/system_calls.cpp +1 -1
  350. data/src/cxx_supportlib/oxt/system_calls.hpp +1 -1
  351. data/src/cxx_supportlib/oxt/thread.hpp +1 -1
  352. data/src/cxx_supportlib/oxt/tracable_exception.hpp +1 -1
  353. data/src/cxx_supportlib/vendor-copy/adhoc_lve.h +1 -1
  354. data/src/cxx_supportlib/vendor-copy/libuv/AUTHORS +353 -3
  355. data/src/cxx_supportlib/vendor-copy/libuv/ChangeLog +3981 -2
  356. data/src/cxx_supportlib/vendor-copy/libuv/LICENSE +1 -28
  357. data/src/cxx_supportlib/vendor-copy/libuv/LICENSE-docs +396 -0
  358. data/src/cxx_supportlib/vendor-copy/libuv/LICENSE-extra +36 -0
  359. data/src/cxx_supportlib/vendor-copy/libuv/Makefile.am +275 -58
  360. data/src/cxx_supportlib/vendor-copy/libuv/Makefile.in +4380 -2125
  361. data/src/cxx_supportlib/vendor-copy/libuv/aclocal.m4 +425 -221
  362. data/src/cxx_supportlib/vendor-copy/libuv/ar-lib +30 -10
  363. data/src/cxx_supportlib/vendor-copy/libuv/compile +31 -14
  364. data/src/cxx_supportlib/vendor-copy/libuv/config.guess +1084 -690
  365. data/src/cxx_supportlib/vendor-copy/libuv/config.sub +1844 -1297
  366. data/src/cxx_supportlib/vendor-copy/libuv/configure +6935 -3664
  367. data/src/cxx_supportlib/vendor-copy/libuv/configure.ac +43 -19
  368. data/src/cxx_supportlib/vendor-copy/libuv/depcomp +12 -11
  369. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-darwin.h → uv/darwin.h} +3 -3
  370. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-errno.h → uv/errno.h} +119 -60
  371. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-linux.h → uv/linux.h} +1 -1
  372. data/src/cxx_supportlib/vendor-copy/libuv/include/uv/os390.h +33 -0
  373. data/src/cxx_supportlib/vendor-copy/libuv/include/uv/posix.h +31 -0
  374. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-threadpool.h → uv/threadpool.h} +1 -1
  375. data/src/cxx_supportlib/vendor-copy/libuv/include/{tree.h → uv/tree.h} +3 -250
  376. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-unix.h → uv/unix.h} +186 -60
  377. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-version.h → uv/version.h} +3 -3
  378. data/src/cxx_supportlib/vendor-copy/libuv/include/uv/win.h +703 -0
  379. data/src/cxx_supportlib/vendor-copy/libuv/include/uv.h +528 -40
  380. data/src/cxx_supportlib/vendor-copy/libuv/install-sh +110 -70
  381. data/src/cxx_supportlib/vendor-copy/libuv/libuv-static.pc.in +12 -0
  382. data/src/cxx_supportlib/vendor-copy/libuv/libuv.pc.in +4 -2
  383. data/src/cxx_supportlib/vendor-copy/libuv/ltmain.sh +995 -619
  384. data/src/cxx_supportlib/vendor-copy/libuv/m4/ax_pthread.m4 +485 -0
  385. data/src/cxx_supportlib/vendor-copy/libuv/m4/libtool.m4 +438 -289
  386. data/src/cxx_supportlib/vendor-copy/libuv/m4/libuv-check-flags.m4 +21 -4
  387. data/src/cxx_supportlib/vendor-copy/libuv/m4/libuv-check-versions.m4 +7 -0
  388. data/src/cxx_supportlib/vendor-copy/libuv/m4/ltoptions.m4 +69 -39
  389. data/src/cxx_supportlib/vendor-copy/libuv/m4/ltsugar.m4 +1 -1
  390. data/src/cxx_supportlib/vendor-copy/libuv/m4/ltversion.m4 +7 -6
  391. data/src/cxx_supportlib/vendor-copy/libuv/m4/lt~obsolete.m4 +2 -2
  392. data/src/cxx_supportlib/vendor-copy/libuv/missing +55 -34
  393. data/src/cxx_supportlib/vendor-copy/libuv/src/fs-poll.c +52 -20
  394. data/src/cxx_supportlib/vendor-copy/libuv/src/idna.c +560 -0
  395. data/src/cxx_supportlib/vendor-copy/libuv/src/idna.h +31 -0
  396. data/src/cxx_supportlib/vendor-copy/libuv/src/inet.c +5 -16
  397. data/src/cxx_supportlib/vendor-copy/libuv/src/queue.h +68 -86
  398. data/src/cxx_supportlib/vendor-copy/libuv/src/random.c +123 -0
  399. data/src/cxx_supportlib/vendor-copy/libuv/src/strscpy.c +38 -0
  400. data/src/cxx_supportlib/vendor-copy/libuv/src/strscpy.h +39 -0
  401. data/src/cxx_supportlib/vendor-copy/libuv/src/strtok.c +52 -0
  402. data/src/cxx_supportlib/vendor-copy/libuv/src/strtok.h +27 -0
  403. data/src/cxx_supportlib/vendor-copy/libuv/src/thread-common.c +175 -0
  404. data/src/cxx_supportlib/vendor-copy/libuv/src/threadpool.c +172 -57
  405. data/src/cxx_supportlib/vendor-copy/libuv/src/{unix/timer.c → timer.c} +57 -29
  406. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/aix-common.c +89 -0
  407. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/aix.c +418 -256
  408. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/async.c +168 -129
  409. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/bsd-ifaddrs.c +163 -0
  410. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/bsd-proctitle.c +99 -0
  411. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/core.c +1312 -378
  412. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/cygwin.c +93 -0
  413. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-proctitle.c +18 -32
  414. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-stub.h +97 -0
  415. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-syscalls.h +17 -0
  416. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin.c +41 -139
  417. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/dl.c +1 -1
  418. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/freebsd.c +75 -235
  419. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/fs.c +1308 -299
  420. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/fsevents.c +150 -148
  421. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/getaddrinfo.c +58 -8
  422. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/getnameinfo.c +3 -2
  423. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/haiku.c +172 -0
  424. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/hurd.c +172 -0
  425. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/ibmi.c +542 -0
  426. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/internal.h +297 -106
  427. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/kqueue.c +325 -94
  428. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux.c +2708 -0
  429. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/loop-watcher.c +11 -11
  430. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/loop.c +105 -24
  431. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/netbsd.c +51 -157
  432. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/no-fsevents.c +42 -0
  433. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/no-proctitle.c +45 -0
  434. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/openbsd.c +42 -183
  435. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-proctitle.c +136 -0
  436. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-syscalls.c +536 -0
  437. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-syscalls.h +75 -0
  438. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390.c +1070 -0
  439. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/pipe.c +324 -55
  440. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/poll.c +58 -11
  441. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/posix-hrtime.c +36 -0
  442. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/posix-poll.c +385 -0
  443. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/process.c +795 -248
  444. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/procfs-exepath.c +45 -0
  445. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/proctitle.c +77 -22
  446. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/qnx.c +142 -0
  447. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-devurandom.c +93 -0
  448. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-getentropy.c +57 -0
  449. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-getrandom.c +86 -0
  450. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-sysctl-linux.c +99 -0
  451. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/signal.c +147 -39
  452. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/stream.c +426 -474
  453. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sunos.c +240 -98
  454. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sysinfo-loadavg.c +36 -0
  455. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sysinfo-memory.c +42 -0
  456. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/tcp.c +402 -91
  457. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/thread.c +497 -145
  458. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/tty.c +269 -45
  459. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/udp.c +695 -165
  460. data/src/cxx_supportlib/vendor-copy/libuv/src/uv-common.c +463 -61
  461. data/src/cxx_supportlib/vendor-copy/libuv/src/uv-common.h +248 -44
  462. data/src/cxx_supportlib/vendor-copy/libuv/src/uv-data-getter-setters.c +119 -0
  463. data/src/cxx_supportlib/vendor-copy/libuv/tsansupp.txt +2 -0
  464. data/src/cxx_supportlib/vendor-modified/libev/Changes +109 -0
  465. data/src/cxx_supportlib/vendor-modified/libev/Makefile.am +2 -1
  466. data/src/cxx_supportlib/vendor-modified/libev/Makefile.in +47 -33
  467. data/src/cxx_supportlib/vendor-modified/libev/README +2 -1
  468. data/src/cxx_supportlib/vendor-modified/libev/aclocal.m4 +1653 -1224
  469. data/src/cxx_supportlib/vendor-modified/libev/config.guess +376 -316
  470. data/src/cxx_supportlib/vendor-modified/libev/config.h.in +13 -2
  471. data/src/cxx_supportlib/vendor-modified/libev/config.sub +156 -154
  472. data/src/cxx_supportlib/vendor-modified/libev/configure +1431 -940
  473. data/src/cxx_supportlib/vendor-modified/libev/configure.ac +3 -3
  474. data/src/cxx_supportlib/vendor-modified/libev/depcomp +5 -5
  475. data/src/cxx_supportlib/vendor-modified/libev/ev++.h +109 -107
  476. data/src/cxx_supportlib/vendor-modified/libev/ev.c +807 -319
  477. data/src/cxx_supportlib/vendor-modified/libev/ev.h +111 -105
  478. data/src/cxx_supportlib/vendor-modified/libev/ev_epoll.c +42 -29
  479. data/src/cxx_supportlib/vendor-modified/libev/ev_iouring.c +694 -0
  480. data/src/cxx_supportlib/vendor-modified/libev/ev_kqueue.c +15 -9
  481. data/src/cxx_supportlib/vendor-modified/libev/ev_linuxaio.c +620 -0
  482. data/src/cxx_supportlib/vendor-modified/libev/ev_poll.c +19 -14
  483. data/src/cxx_supportlib/vendor-modified/libev/ev_port.c +8 -5
  484. data/src/cxx_supportlib/vendor-modified/libev/ev_select.c +6 -6
  485. data/src/cxx_supportlib/vendor-modified/libev/ev_vars.h +48 -3
  486. data/src/cxx_supportlib/vendor-modified/libev/ev_win32.c +2 -2
  487. data/src/cxx_supportlib/vendor-modified/libev/ev_wrap.h +72 -0
  488. data/src/cxx_supportlib/vendor-modified/libev/install-sh +23 -13
  489. data/src/cxx_supportlib/vendor-modified/libev/libev.m4 +6 -1
  490. data/src/cxx_supportlib/vendor-modified/libev/ltmain.sh +3581 -1993
  491. data/src/cxx_supportlib/vendor-modified/libev/missing +8 -8
  492. data/src/cxx_supportlib/vendor-modified/libev/mkinstalldirs +3 -3
  493. data/src/cxx_supportlib/vendor-modified/modp_b64_strict_aliasing.cpp +1 -1
  494. data/src/helper-scripts/backtrace-sanitizer.rb +1 -1
  495. data/src/helper-scripts/crash-watch.rb +1 -1
  496. data/src/helper-scripts/download_binaries/extconf.rb +1 -1
  497. data/src/helper-scripts/meteor-loader.rb +4 -1
  498. data/src/helper-scripts/node-loader.js +1 -1
  499. data/src/helper-scripts/prespawn +1 -1
  500. data/src/helper-scripts/rack-loader.rb +4 -1
  501. data/src/helper-scripts/rack-preloader.rb +4 -1
  502. data/src/helper-scripts/wsgi-loader.py +1 -1
  503. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +1 -1
  504. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c.cxxcodebuilder +1 -1
  505. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +1 -1
  506. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c.cxxcodebuilder +1 -1
  507. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +1 -1
  508. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c.cxxcodebuilder +1 -1
  509. data/src/nginx_module/Configuration.c +1 -1
  510. data/src/nginx_module/Configuration.h +1 -1
  511. data/src/nginx_module/ContentHandler.c +14 -2
  512. data/src/nginx_module/ContentHandler.h +1 -1
  513. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +1 -1
  514. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +1 -1
  515. data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +1 -1
  516. data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c.cxxcodebuilder +1 -1
  517. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +1 -1
  518. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +1 -1
  519. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +1 -1
  520. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c.cxxcodebuilder +1 -1
  521. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +1 -1
  522. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
  523. data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +1 -1
  524. data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +1 -1
  525. data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +1 -1
  526. data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +1 -1
  527. data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +1 -1
  528. data/src/nginx_module/MainConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
  529. data/src/nginx_module/StaticContentHandler.c +1 -1
  530. data/src/nginx_module/StaticContentHandler.h +1 -1
  531. data/src/nginx_module/ngx_http_passenger_module.c +1 -1
  532. data/src/nginx_module/ngx_http_passenger_module.h +1 -1
  533. data/src/nodejs_supportlib/phusion_passenger/line_reader.js +1 -1
  534. data/src/ruby_native_extension/extconf.rb +1 -1
  535. data/src/ruby_native_extension/passenger_native_support.c +1 -1
  536. data/src/ruby_supportlib/phusion_passenger/abstract_installer.rb +1 -1
  537. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +3 -1
  538. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +3 -1
  539. data/src/ruby_supportlib/phusion_passenger/admin_tools/memory_stats.rb +4 -12
  540. data/src/ruby_supportlib/phusion_passenger/admin_tools.rb +3 -1
  541. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +1 -1
  542. data/src/ruby_supportlib/phusion_passenger/apache2/config_utils.rb +7 -1
  543. data/src/ruby_supportlib/phusion_passenger/common_library.rb +11 -10
  544. data/src/ruby_supportlib/phusion_passenger/config/about_command.rb +3 -1
  545. data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +3 -1
  546. data/src/ruby_supportlib/phusion_passenger/config/api_call_command.rb +3 -1
  547. data/src/ruby_supportlib/phusion_passenger/config/build_native_support_command.rb +3 -1
  548. data/src/ruby_supportlib/phusion_passenger/config/command.rb +3 -1
  549. data/src/ruby_supportlib/phusion_passenger/config/compile_agent_command.rb +3 -1
  550. data/src/ruby_supportlib/phusion_passenger/config/compile_nginx_engine_command.rb +3 -1
  551. data/src/ruby_supportlib/phusion_passenger/config/detach_process_command.rb +3 -1
  552. data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +3 -1
  553. data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +3 -1
  554. data/src/ruby_supportlib/phusion_passenger/config/install_agent_command.rb +3 -1
  555. data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +3 -1
  556. data/src/ruby_supportlib/phusion_passenger/config/installation_utils.rb +5 -1
  557. data/src/ruby_supportlib/phusion_passenger/config/list_instances_command.rb +3 -1
  558. data/src/ruby_supportlib/phusion_passenger/config/main.rb +3 -1
  559. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +5 -2
  560. data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +8 -1
  561. data/src/ruby_supportlib/phusion_passenger/config/restart_app_command.rb +3 -1
  562. data/src/ruby_supportlib/phusion_passenger/config/system_metrics_command.rb +3 -1
  563. data/src/ruby_supportlib/phusion_passenger/config/system_properties_command.rb +3 -1
  564. data/src/ruby_supportlib/phusion_passenger/config/utils.rb +5 -1
  565. data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +3 -1
  566. data/src/ruby_supportlib/phusion_passenger/console_text_template.rb +1 -1
  567. data/src/ruby_supportlib/phusion_passenger/constants.rb +5 -1
  568. data/src/ruby_supportlib/phusion_passenger/debug_logging.rb +3 -1
  569. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +3 -1
  570. data/src/ruby_supportlib/phusion_passenger/message_channel.rb +1 -1
  571. data/src/ruby_supportlib/phusion_passenger/message_client.rb +1 -1
  572. data/src/ruby_supportlib/phusion_passenger/native_support.rb +1 -1
  573. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +1 -1
  574. data/src/ruby_supportlib/phusion_passenger/packaging.rb +7 -3
  575. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +3 -1
  576. data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +3 -1
  577. data/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb +3 -1
  578. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +197 -11
  579. data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +2 -1
  580. data/src/ruby_supportlib/phusion_passenger/platform_info/curl.rb +3 -1
  581. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +3 -1
  582. data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck.rb +4 -0
  583. data/src/ruby_supportlib/phusion_passenger/platform_info/linux.rb +3 -1
  584. data/src/ruby_supportlib/phusion_passenger/platform_info/networking.rb +3 -1
  585. data/src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb +3 -1
  586. data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +3 -1
  587. data/src/ruby_supportlib/phusion_passenger/platform_info/pcre.rb +3 -1
  588. data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +3 -1
  589. data/src/ruby_supportlib/phusion_passenger/platform_info/zlib.rb +3 -1
  590. data/src/ruby_supportlib/phusion_passenger/platform_info.rb +3 -1
  591. data/src/ruby_supportlib/phusion_passenger/plugin.rb +1 -1
  592. data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +2 -1
  593. data/src/ruby_supportlib/phusion_passenger/public_api.rb +3 -1
  594. data/src/ruby_supportlib/phusion_passenger/rack/handler.rb +7 -1
  595. data/src/ruby_supportlib/phusion_passenger/rack/out_of_band_gc.rb +3 -1
  596. data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +7 -1
  597. data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +13 -1
  598. data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +4 -7
  599. data/src/ruby_supportlib/phusion_passenger/request_handler.rb +1 -1
  600. data/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb +5 -1
  601. data/src/ruby_supportlib/phusion_passenger/ruby_core_io_enhancements.rb +1 -1
  602. data/src/ruby_supportlib/phusion_passenger/simple_benchmarking.rb +1 -1
  603. data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +3 -1
  604. data/src/ruby_supportlib/phusion_passenger/standalone/command.rb +3 -1
  605. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +5 -1
  606. data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +5 -1
  607. data/src/ruby_supportlib/phusion_passenger/standalone/control_utils.rb +5 -1
  608. data/src/ruby_supportlib/phusion_passenger/standalone/main.rb +3 -1
  609. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +8 -2
  610. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +10 -8
  611. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +3 -1
  612. data/src/ruby_supportlib/phusion_passenger/standalone/status_command.rb +3 -1
  613. data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +3 -1
  614. data/src/ruby_supportlib/phusion_passenger/standalone/version_command.rb +3 -1
  615. data/src/ruby_supportlib/phusion_passenger/utils/ansi_colors.rb +5 -1
  616. data/src/ruby_supportlib/phusion_passenger/utils/download.rb +5 -1
  617. data/src/ruby_supportlib/phusion_passenger/utils/file_system_watcher.rb +3 -1
  618. data/src/ruby_supportlib/phusion_passenger/utils/hosts_file_parser.rb +3 -1
  619. data/src/ruby_supportlib/phusion_passenger/utils/json.rb +4 -0
  620. data/src/ruby_supportlib/phusion_passenger/utils/lock.rb +3 -1
  621. data/src/ruby_supportlib/phusion_passenger/utils/native_support_utils.rb +5 -1
  622. data/src/ruby_supportlib/phusion_passenger/utils/progress_bar.rb +1 -1
  623. data/src/ruby_supportlib/phusion_passenger/utils/strscan.rb +3 -1
  624. data/src/ruby_supportlib/phusion_passenger/utils/tee_input.rb +2 -0
  625. data/src/ruby_supportlib/phusion_passenger/utils/terminal_choice_menu.rb +3 -1
  626. data/src/ruby_supportlib/phusion_passenger/utils/tmpio.rb +2 -0
  627. data/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb +5 -13
  628. data/src/ruby_supportlib/phusion_passenger/utils.rb +3 -1
  629. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/app.rb +3 -1
  630. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/base.rb +3 -1
  631. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +3 -1
  632. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/lldb_controller.rb +3 -1
  633. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/utils.rb +5 -1
  634. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/version.rb +3 -1
  635. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/lock_file.rb +10 -6
  636. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/spawn.rb +4 -3
  637. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/version.rb +8 -4
  638. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +395 -579
  639. data/src/ruby_supportlib/phusion_passenger.rb +10 -8
  640. data/src/schema_printer/SchemaPrinterMain.cpp +1 -1
  641. data/src/schema_printer/SchemaPrinterMain.cpp.cxxcodebuilder +1 -1
  642. metadata +76 -36
  643. data/doc/DeveloperQuickstart.md +0 -70
  644. data/src/README.md +0 -7
  645. data/src/cxx_supportlib/vendor-copy/libuv/README.md +0 -245
  646. data/src/cxx_supportlib/vendor-copy/libuv/checksparse.sh +0 -234
  647. data/src/cxx_supportlib/vendor-copy/libuv/common.gypi +0 -210
  648. data/src/cxx_supportlib/vendor-copy/libuv/gyp_uv.py +0 -93
  649. data/src/cxx_supportlib/vendor-copy/libuv/include/android-ifaddrs.h +0 -54
  650. data/src/cxx_supportlib/vendor-copy/libuv/include/pthread-fixes.h +0 -72
  651. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/android-ifaddrs.c +0 -703
  652. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/atomic-ops.h +0 -77
  653. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-core.c +0 -899
  654. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-inotify.c +0 -285
  655. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-syscalls.c +0 -471
  656. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-syscalls.h +0 -158
  657. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/pthread-fixes.c +0 -104
  658. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/spinlock.h +0 -53
  659. data/src/cxx_supportlib/vendor-copy/libuv/uv.gyp +0 -508
  660. /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-aix.h → uv/aix.h} +0 -0
  661. /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-bsd.h → uv/bsd.h} +0 -0
  662. /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-sunos.h → uv/sunos.h} +0 -0
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2010-2025 Asynchronous B.V.
2
+ # Copyright (c) 2010-2026 Asynchronous B.V.
3
3
  #
4
4
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
5
5
  # trademarks of Asynchronous B.V.
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016-2025 Asynchronous B.V.
1
+ Copyright (c) 2016-2026 Asynchronous B.V.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # encoding: binary
2
2
 
3
- # Copyright (c) 2016-2025 Asynchronous B.V.
3
+ # Copyright (c) 2016-2026 Asynchronous B.V.
4
4
  #
5
5
  # "Union Station" and "Passenger" are trademarks of Asynchronous B.V.
6
6
  #
@@ -25,6 +25,7 @@
25
25
  require 'strscan'
26
26
 
27
27
  module CxxHintedParser
28
+
28
29
  class Parser
29
30
  STRUCT_BEGIN_HINT = /- ?begin hinted parseable (struct|class) ?-/
30
31
  STRUCT_END_HINT = /- ?end hinted parseable (struct|class) ?-/
@@ -236,4 +237,5 @@ module CxxHintedParser
236
237
  @errors << Error.new(line, column, message)
237
238
  end
238
239
  end
240
+
239
241
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016-2025 Asynchronous B.V.
1
+ # Copyright (c) 2016-2026 Asynchronous B.V.
2
2
  #
3
3
  # "Union Station" and "Passenger" are trademarks of Asynchronous B.V.
4
4
  #
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016-2025 Asynchronous B.V.
1
+ Copyright (c) 2016-2026 Asynchronous B.V.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- # Copyright (c) 2016-2025 Asynchronous B.V.
3
+ # Copyright (c) 2016-2026 Asynchronous B.V.
4
4
  #
5
5
  # "Union Station" and "Passenger" are trademarks of Asynchronous B.V.
6
6
  #
@@ -25,6 +25,7 @@
25
25
  require File.expand_path(File.dirname(__FILE__) + '/initializer_builder')
26
26
 
27
27
  module CxxCodeBuilder
28
+
28
29
  # Builds C/C++ code. Use it as follows:
29
30
  #
30
31
  # 1. Create a CxxCodeBuilder::Builder object.
@@ -627,4 +628,5 @@ module CxxCodeBuilder
627
628
  str
628
629
  end
629
630
  end
631
+
630
632
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- # Copyright (c) 2016-2025 Asynchronous B.V.
3
+ # Copyright (c) 2016-2026 Asynchronous B.V.
4
4
  #
5
5
  # "Union Station" and "Passenger" are trademarks of Asynchronous B.V.
6
6
  #
@@ -23,6 +23,7 @@
23
23
  # THE SOFTWARE.
24
24
 
25
25
  module CxxCodeBuilder
26
+
26
27
  # Builds array and struct initialization code.
27
28
  class InitializerBuilder
28
29
  def initialize(builder, start_character, end_character)
@@ -163,4 +164,5 @@ module CxxCodeBuilder
163
164
  @builder.add_code_without_newline(@end_character)
164
165
  end
165
166
  end
167
+
166
168
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016-2025 Asynchronous B.V.
1
+ # Copyright (c) 2016-2026 Asynchronous B.V.
2
2
  #
3
3
  # "Union Station" and "Passenger" are trademarks of Asynchronous B.V.
4
4
  #
data/build/test_basics.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2010-2025 Asynchronous B.V.
2
+ # Copyright (c) 2010-2026 Asynchronous B.V.
3
3
  #
4
4
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
5
5
  # trademarks of Asynchronous B.V.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # Phusion Passenger - https://www.phusionpassenger.com/
3
- # Copyright (c) 2010-2025 Asynchronous B.V.
3
+ # Copyright (c) 2010-2026 Asynchronous B.V.
4
4
  #
5
5
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  # trademarks of Asynchronous B.V.
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'pp'
3
+ require 'stringio'
3
4
 
4
5
  SEARCH_PATHS = [
5
6
  "src",
@@ -221,6 +222,9 @@ def generate_full_map(basic_map)
221
222
  end
222
223
 
223
224
  result = generate_full_map(generate_basic_map)
224
- puts "# Autogenerated by dev/index_cxx_dependencies.rb"
225
+ puts "# Autogenerated by dev/index_cxx_dependencies.rb (update with `rake dependency_map`)"
225
226
  puts "CXX_DEPENDENCY_MAP ="
226
- PP.pp(result, STDOUT, 1)
227
+
228
+ output = StringIO.new
229
+ PP.pp(result, output, 1)
230
+ puts output.string.gsub(/ =>\n/m, "=>\n")
@@ -0,0 +1,108 @@
1
+ From 4fb0fa52b2ad4d5cc1263c15d41f272ec142864b Mon Sep 17 00:00:00 2001
2
+ From: Camden Narzt <c.narzt@me.com>
3
+ Date: Sun, 23 Aug 2026 16:27:02 -0600
4
+ Subject: [PATCH] changes
5
+
6
+ ---
7
+ ev++.h | 4 ++--
8
+ ev.c | 18 +++++++++++++++++-
9
+ ev.h | 9 ++++++---
10
+ 3 files changed, 25 insertions(+), 6 deletions(-)
11
+
12
+ diff --git a/ev++.h b/ev++.h
13
+ index 22dfcf5..f445fbc 100644
14
+ --- a/ev++.h
15
+ +++ b/ev++.h
16
+ @@ -570,12 +570,12 @@ namespace ev {
17
+ return ev_embeddable_backends ();
18
+ }
19
+
20
+ - inline void set_allocator (void *(*cb)(void *ptr, long size) EV_NOEXCEPT) EV_NOEXCEPT
21
+ + inline void set_allocator (void *(*cb)(void *ptr, long size)) EV_NOEXCEPT
22
+ {
23
+ ev_set_allocator (cb);
24
+ }
25
+
26
+ - inline void set_syserr_cb (void (*cb)(const char *msg) EV_NOEXCEPT) EV_NOEXCEPT
27
+ + inline void set_syserr_cb (void (*cb)(const char *msg)) EV_NOEXCEPT
28
+ {
29
+ ev_set_syserr_cb (cb);
30
+ }
31
+ diff --git a/ev.c b/ev.c
32
+ index ec212a1..9c697cb 100644
33
+ --- a/ev.c
34
+ +++ b/ev.c
35
+ @@ -507,7 +507,11 @@
36
+ #endif
37
+
38
+ #if EV_USE_INOTIFY
39
+ -# include <sys/statfs.h>
40
+ +# ifdef __FreeBSD__
41
+ +# include <sys/mount.h>
42
+ +# else
43
+ +# include <sys/statfs.h>
44
+ +# endif
45
+ # include <sys/inotify.h>
46
+ /* some very old inotify.h headers don't have IN_DONT_FOLLOW */
47
+ # ifndef IN_DONT_FOLLOW
48
+ @@ -3196,6 +3200,18 @@ ev_backend (EV_P) EV_NOEXCEPT
49
+ return backend;
50
+ }
51
+
52
+ +int
53
+ +ev_backend_fd (EV_P) EV_THROW
54
+ +{
55
+ + return backend_fd;
56
+ +}
57
+ +
58
+ +int
59
+ +ev_loop_get_pipe (EV_P_ unsigned int index) EV_THROW
60
+ +{
61
+ + return evpipe[index];
62
+ +}
63
+ +
64
+ #if EV_FEATURE_API
65
+ unsigned int
66
+ ev_iteration (EV_P) EV_NOEXCEPT
67
+ diff --git a/ev.h b/ev.h
68
+ index 4669c39..2384093 100644
69
+ --- a/ev.h
70
+ +++ b/ev.h
71
+ @@ -545,13 +545,13 @@ EV_API_DECL void ev_sleep (ev_tstamp delay) EV_NOEXCEPT; /* sleep for a while */
72
+ * or take some potentially destructive action.
73
+ * The default is your system realloc function.
74
+ */
75
+ -EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_NOEXCEPT) EV_NOEXCEPT;
76
+ +EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size)) EV_NOEXCEPT;
77
+
78
+ /* set the callback function to call on a
79
+ * retryable syscall error
80
+ * (such as failed select, poll, epoll_wait)
81
+ */
82
+ -EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg) EV_NOEXCEPT) EV_NOEXCEPT;
83
+ +EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg)) EV_NOEXCEPT;
84
+
85
+ #if EV_MULTIPLICITY
86
+
87
+ @@ -616,6 +616,9 @@ EV_API_DECL unsigned int ev_backend (EV_P) EV_NOEXCEPT; /* backend in use by loo
88
+
89
+ EV_API_DECL void ev_now_update (EV_P) EV_NOEXCEPT; /* update event loop time */
90
+
91
+ +EV_API_DECL int ev_backend_fd (EV_P) EV_THROW;
92
+ +EV_API_DECL int ev_loop_get_pipe (EV_P_ unsigned int index) EV_THROW;
93
+ +
94
+ #if EV_WALK_ENABLE
95
+ /* walk (almost) all watchers in the loop of a given type, invoking the */
96
+ /* callback on every such watcher. The callback might stop the watcher, */
97
+ @@ -672,7 +675,7 @@ EV_API_DECL void *ev_userdata (EV_P) EV_NOEXCEPT;
98
+ typedef void (*ev_loop_callback)(EV_P);
99
+ EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ ev_loop_callback invoke_pending_cb) EV_NOEXCEPT;
100
+ /* C++ doesn't allow the use of the ev_loop_callback typedef here, so we need to spell it out */
101
+ -EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_NOEXCEPT, void (*acquire)(EV_P) EV_NOEXCEPT) EV_NOEXCEPT;
102
+ +EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P)) EV_NOEXCEPT;
103
+
104
+ EV_API_DECL unsigned int ev_pending_count (EV_P) EV_NOEXCEPT; /* number of pending events, if any */
105
+
106
+ --
107
+ 2.50.1 (Apple Git-155)
108
+
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # Phusion Passenger - https://www.phusionpassenger.com/
3
- # Copyright (c) 2024-2025 Asynchronous B.V.
3
+ # Copyright (c) 2024-2026 Asynchronous B.V.
4
4
  #
5
5
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  # trademarks of Asynchronous B.V.
data/dev/ruby_server.rb CHANGED
@@ -135,12 +135,7 @@ private
135
135
  def handle_next_client(forward_connection)
136
136
  client = @server.accept
137
137
  begin
138
- if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.3.0')
139
- buffer = String.new(encoding: Encoding::BINARY)
140
- else
141
- buffer = ""
142
- buffer.force_encoding('binary') if buffer.respond_to?(:force_encoding)
143
- end
138
+ buffer = "".b
144
139
  while true
145
140
  begin
146
141
  read_header(client, buffer)
data/dev/runner CHANGED
@@ -29,5 +29,7 @@ while true
29
29
  end
30
30
 
31
31
  module PhusionPassenger
32
+
32
33
  p eval(ARGV.join(" "))
34
+
33
35
  end
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+ set -x
3
+ VERSION=1.49.2
4
+ #apt update && apt install -y build-essential curl libtool autoconf
5
+ rm -rf src/cxx_supportlib/vendor-copy/libuv
6
+ curl -sSL "https://dist.libuv.org/dist/v${VERSION}/libuv-v${VERSION}.tar.gz" | tar -C src/cxx_supportlib/vendor-copy/ -xz
7
+ mv src/cxx_supportlib/vendor-copy/libuv-* src/cxx_supportlib/vendor-copy/libuv
8
+ cd src/cxx_supportlib/vendor-copy/libuv || exit 1
9
+ if [ "$(uname)" = Darwin ]; then
10
+ sed -e 's/AC_CONFIG_LINKS(\[test/# &/g' -i '' configure.ac
11
+ else
12
+ sed -e 's/AC_CONFIG_LINKS(\[test/# &/g' -i'' configure.ac
13
+ fi
14
+ ./autogen.sh
15
+ rm -rf test docs img tools .github CMakeLists.txt cmake-toolchains src/win autogen.sh .readthedocs.yaml .mailmap
16
+ find . \( -name '*.md' -o -name '.git*' \) -delete
@@ -0,0 +1,55 @@
1
+ # Basic architecture overview
2
+
3
+ ## Multi-process
4
+
5
+ - Web server (Apache or Nginx, both with the Passenger module loaded). Only simple I/O processing and lifecycle management of the Passenger Watchdog Agent.
6
+ - PassengerAgent: single binary w/ multiple personalities. Most important:
7
+ - Watchdog: spawns and supervises Core Agent and a bunch of other periodic helper tasks.
8
+ - Core: most logic happens here. Main request processing (Controller), spawns (SpawningKit) and supervises (ApplicationPool) application processes, keeps track of various statistics. Has an API server (separate socket) for management operations (used by e.g. `passenger-status`).
9
+
10
+ ### HTTP request flow
11
+
12
+ 1. Requests are commonly first received by the web server, which forwards request to Passenger Core (via its Unix domain socket in the instance directory). Core's Controller subsystem then processes it.
13
+ 2. Requests may also be directly received by Passenger Core (Passenger Standalone + "builtin" engine).
14
+ 3. Passenger Core's Controller subsystem uses ApplicationPool to determine whether to spawn an application process or which process to route request to. Connects to the app's Unix domain socket (also located in the instance directory) or reuses keepalive socket.
15
+ 4. Response from app forwarded back to the connecting client (could be a real client or the web server).
16
+
17
+ ### Applcation processes lifecycle management and request routing
18
+
19
+ - Main logic in ApplicationPool (src/agent/Core/ApplicationPool). Keeps track of which application Processes exist. Contains logic for routing a request to best Process.
20
+ - Pool has many Groups. Group has many Processes (for application processes). Process has many Sockets (of which one is the "main socket" for receiving requests).
21
+ - Spawning logic outsourced to SpawningKit.
22
+
23
+ ## C++ tech stack
24
+
25
+ - Agent written in C++
26
+ - C++14
27
+ - Boost. But prefer C++14
28
+
29
+ ### HTTP and non-blocking I/O handling
30
+
31
+ - ServerKit (src/cxx_supportlib/ServerKit)
32
+ - libev
33
+ - Some parts use libuv. Integrates with libev via SafeLibev.h
34
+
35
+ ## Important directories
36
+
37
+ - src: most source code
38
+ - src/agent: various agents
39
+ - src/agent/Core
40
+ - src/agent/Watchdog
41
+ - src/nginx_module
42
+ - src/apache2_module
43
+ - src/cxx_supportlib: C++ support library
44
+ - src/ruby_supportlib: Ruby parts of passenger: Passenger Standalone, Passenger Config, admin tool helpers, shared Ruby app loading code, generic utilities
45
+ - src/helper-scripts: various helper scripts, including SpawningKit language-specific (pre)loaders.
46
+ - bin: user-invocable executables (CLI tools)
47
+ - build: build system
48
+ - test: unit and integration tests
49
+ - dev: scripts used during development and CI, not used during runtime
50
+ - resources: non-executable resources, used during runtime
51
+ - packaging: Debian/RPM/Homebrew packaging automation
52
+
53
+ ## See also
54
+
55
+ An older [Design & Architecture](https://www.phusionpassenger.com/documentation/Design%20and%20Architecture.html) document.
@@ -0,0 +1,23 @@
1
+ ## Build caching (ccache)
2
+
3
+ Set this environment variable to make our build system prefix all compiler invocations with [ccache](https://ccache.dev/):
4
+
5
+ ```bash
6
+ export USE_CCACHE=1
7
+ ```
8
+
9
+ You also need:
10
+
11
+ ```bash
12
+ # Required for caching test files (involves precompiled headers)
13
+ export CCACHE_SLOPPINESS=pch_defines,time_macros
14
+ ```
15
+
16
+ When using multiple worktrees, configure cache sharing:
17
+
18
+ ```bash
19
+ export CCACHE_BASEDIR=<full path to common parent directory of the worktrees>
20
+ # Prevent debug info from distinguishing between worktrees
21
+ export EXTRA_CFLAGS=-fdebug-prefix-map="$PWD"=.
22
+ export EXTRA_CXXFLAGS=-fdebug-prefix-map="$PWD"=.
23
+ ```
@@ -0,0 +1,49 @@
1
+ # Build system
2
+
3
+ Our build system is [Rake](https://github.com/ruby/rake). Its functionality is similar to Make, but its DSL is in Ruby. `passenger-install-apache2-module` and `passenger-install-nginx-module` call Rake to compile things.
4
+
5
+ ## Key Rake targets
6
+
7
+ - `rake apache2` — compiles the Apache 2 module, and other parts needed by the Apache integration mode (e.g., the Passenger agent binary).
8
+ - `rake nginx` — compiles parts needed by the Nginx integration mode (e.g., agent binary). Does *not* compile the Nginx module.
9
+ - For test suite targets, see [Running tests](RunningTests.md).
10
+
11
+ See more with `rake -T`.
12
+
13
+ ## Concurrent compilation
14
+
15
+ Run `rake -m -j<NUMBER>` for concurrent compilation. `<NUMBER>` should equal the number of CPU cores.
16
+
17
+ ## Environment variables
18
+
19
+ You can pass environment variables via CLI arguments. These are equivalent:
20
+
21
+ ```bash
22
+ rake something FOO=123
23
+
24
+ export FOO=123 && rake something
25
+ ```
26
+
27
+ You can persist environment variables in `config.rb`. This file is automatically loaded by Rake.
28
+
29
+ ```ruby
30
+ # config.rb
31
+ ENV['FOO'] = '123'
32
+ ```
33
+
34
+ ## Customization
35
+
36
+ Customize the build system with environment variables. Boolean options can be set to true, false, 0 or 1.
37
+
38
+ - `OUTPUT_DIR`: where build output is placed. Default: `buildout/`
39
+ - `EXTRA_PRE_CFLAGS` and `EXTRA_CFLAGS`: insert additional flags to C compiler invocations. One for before our own flags, one for after. Does not cover linking invocations.
40
+ - `EXTRA_PRE_CXXFLAGS` and `EXTRA_CXXFLAGS`: ditto, but for C++ compiler invocations.
41
+ - `EXTRA_PRE_LDFLAGS` and `EXTRA_LDFLAGS`: insert additional flags to C/C++ compiler linking invocations. One for before our own flags, one for after.
42
+ - `EXTRA_PRE_C_LDFLAGS` and `EXTRA_C_LDFLAGS`: ditto, but only applies to C compiler linking invocations.
43
+ - `EXTRA_PRE_CXX_LDFLAGS` and `EXTRA_CXX_LDFLAGS`: ditto, but only applies to C++ compiler linking invocations.
44
+ - `USE_CCACHE=<bool>` (default: false): wrap compiler invocations in ccache. See also [ccache setup instructions](DevEnvironmentSetup.md#build-caching).
45
+ - `USE_ASAN=<bool>` (default: false): compile with AddressSanitizer.
46
+ - `USE_UBSAN=<bool>` (default: false): compile with UndefinedBehaviorSanitizer.
47
+ - `OPTIMIZE=<bool>` (default: false): compile with optimizations.
48
+ - `USE_VENDORED_LIBEV=<bool>` (default: true): set to false to compile with system-provided libev instead of our vendored one.
49
+ - `USE_VENDORED_LIBUV=<bool>` (default: true): set to false to compile with system-provided libuv instead of our vendored one.
@@ -45,6 +45,8 @@ Increase PassengerLogLevel to print more debugging messages.
45
45
 
46
46
  Recompile Phusion Passenger with the environment variable `USE_ASAN=1` to enable support for AddressSanitizer.
47
47
 
48
+ On GCC, you should set the environment variable `ASAN_OPTIONS=detect_stack_use_after_return=1` too when running binaries.
49
+
48
50
  ## Simulating system call failures
49
51
 
50
52
  Error conditions are sometimes hard to test. Things like network errors are usually hard to simulate using real equipment. In order to facilitate with error testing, we've developed a system call failure simulation framework, inspired by sqlite's failure test suite. You specify which system call errors should be simulated, and with what probability they should occur. By running normal tests multiple times you can see how Phusion Passenger behaves under these simulated error conditions.
@@ -40,6 +40,7 @@ We pick strategy 1.
40
40
  - **Code with broad version compatibility**: Since we can't rely on specific gem versions, we must use gems in a way that's compatible with a wide number of gem versions.
41
41
  - **Development code can YOLO with gem dependencies**: Development-related Passenger Ruby code can depend on any gem, since development code is not included in native packages.
42
42
  - All such dependencies must be specified in the Passenger Gemfile.
43
+ - Note: the build system (Rakefile) does not count as "development-related Ruby code" because it's used outside just development. For example `passenger-install-XXX-module` calls Rake to compile things.
43
44
 
44
45
  ## See also
45
46
 
@@ -0,0 +1,46 @@
1
+ # Development environment setup
2
+
3
+ ## Basic requirements
4
+
5
+ - A C/C++ compiler toolchain
6
+ - Ubuntu: `apt install build-essential`
7
+ - Ruby, including development headers
8
+ - Ubuntu: `apt install ruby ruby-dev`
9
+ - For working on Node.js support: Node.js and NPM
10
+ - Ubuntu: `apt install nodejs`
11
+ - For working on the Apache module: Apache and its development headers
12
+ - Ubuntu: `apt install apache2 apache2-dev`
13
+ - For working on the Nginx module: Nginx and its source code
14
+ - Ubuntu: `apt install nginx-dev` (sources end up in /usr/share/nginx/src)
15
+
16
+ ## Setup test suites
17
+
18
+ Install the testing dependencies:
19
+
20
+ - `bundle install`
21
+ - To run the Node.js test suite: `npm install`
22
+
23
+ Configure the C++ unit test suite:
24
+
25
+ - Create `test/config.json` (see the `.example` file)
26
+
27
+ ## C++ development tooling recommendations
28
+
29
+ ## Clangd support
30
+
31
+ [Clangd](https://clangd.llvm.org/) is great for IDE/editor auto-complete and symbol navigation.
32
+
33
+ Use [bear](https://github.com/rizsotto/bear) to generate `compile_commands.json` once:
34
+
35
+ ```bash
36
+ bear -- rake -m -j4 nginx apache2 test:cxx:build buildout/test/oxt/main
37
+ ```
38
+
39
+ ## Build caching (ccache)
40
+
41
+ See [separate document](BuildCaching.md).
42
+
43
+ ## C++ debugging
44
+
45
+ - If using gdb to debug the C++ test suite: create `test/.gdbinit` (see `test/gdbinit.example`).
46
+ - When using Visual Studio Code, we recommend the [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) extension.
@@ -0,0 +1,28 @@
1
+ # Passenger development handbook
2
+
3
+ ## Fundamentals
4
+
5
+ - [Basic architecture overview](BasicArchitectureOverview.md)
6
+ - [Development environment setup](DevEnvironmentSetup.md) — Prerequisites for C++, Ruby, Node.js, Apache, and Nginx work; test setup; clangd, ccache, and debugger configuration.
7
+ - [Build system](BuildSystem.md) — How it works, how to compile various parts of Passenger. Rake targets for Apache and Nginx integration, output and compiler/linker settings, sanitizers, optimization, and vendored libev/libuv controls. Recommended Rake flags for concurrent building. Instructions for persisting dev-time environment variables (loaded by Rake).
8
+ - [Build caching](BuildCaching.md) — ccache setup.
9
+ - [Running tests](RunningTests.md) — Ruby, Node.js, C++/oxt, integration, and packaging test suites; selecting C++ groups or test numbers; debugger and Valgrind support; and root-only tests; safely running test suites directly (bypassing Rake); example test suite outputs.
10
+ - [Writing C++ tests](WritingCxxTests.md) — How C++ tests are structured; how our testing framework (forked tut) works; available assertions.
11
+ - [C++ mocking strategy](CxxMockingStrategy.md)
12
+
13
+ ## Best practices
14
+
15
+ - [Coding tips and common pitfalls](CodingTipsAndPitfalls.md) — C++ object-lifetime and event-loop hazards involving `shared_ptr`, callbacks, exceptions, and thread-interruption-safe RAII destructors.
16
+ - [Secure handling of temp files](SecureTempFileHandling.md) — Preventing symlink, file-squatting, and TOCTOU attacks through unpredictable names, atomic reservation, restrictive permissions, `mkstemp()`, and `mkdtemp()`.
17
+
18
+ ## Design decisions & aspects
19
+
20
+ - [Limited gem dependencies](DesignAspects/LimitedGemDependencies.md) — Runtime Ruby dependency policy for gem and native-package installs, multiple Ruby versions, execution with or without Bundler, OS repository availability, and gemspec versus Gemfile placement.
21
+ - [No gem activation during Ruby loader initialization](DesignAspects/NoGemActivationDuringRubyLoaderInitialization.md) — No-activation rule for code called before Bundler by the Ruby loaders, including gemified standard-library code and Ruby/C++ reimplementation strategies.
22
+
23
+ ## Subsystems in C++
24
+
25
+ - [ConfigKit](../src/cxx_supportlib/ConfigKit/README.md) — Core JSON configuration API covering runtime-introspectable schemas and stores, defaults, nested schemas, validation, normalization, updates, inspection, and secret filtering.
26
+ - [ConfigKit practical usage & design patterns](../src/cxx_supportlib/ConfigKit/IN_PRACTICE.md) — Configurable-component patterns covering config realizations, subclassing and composition, translators, atomic prepare/commit with infallible commit, asynchronous event-loop wrappers, and concurrency serialization.
27
+ - [SpawningKit](../src/agent/Core/SpawningKit/README.md) — Reliably starting web application worker/preloader processes: spawn methods (direct/smart), wrappers/start commands, process environment and privilege setup, startup handshakes/readiness checks, timeouts, and detailed spawn-failure diagnostics.
28
+ - [Wrapper registry](../src/cxx_supportlib/WrapperRegistry/README.md) — Registry of supported application types and language wrappers: maps app type names/aliases to wrapper loader, interpreter, process title, and startup-file signatures used by application autodetection and spawning.
data/doc/Packaging.md CHANGED
@@ -50,7 +50,7 @@ version).
50
50
  In this configuration, files can be scattered anywhere throughout the filesystem. This
51
51
  way Phusion Passenger can be packaged in an FHS-compliant way. The exact locations
52
52
  of the different types of files can be specified through a
53
- _location configuration file_. The existance and usage of a location configuration
53
+ _location configuration file_. The existence and usage of a location configuration
54
54
  file does not automatically imply that Phusion Passenger is natively packaged.
55
55
 
56
56
  If Phusion Passenger needs to have a new Ruby extension compiled, then it will
@@ -0,0 +1,88 @@
1
+ # Running tests
2
+
3
+ All Rake commands also compile whatever is necessary.
4
+
5
+ Common test suites:
6
+
7
+ - `rake test:ruby` — Ruby support unit tests
8
+ - `rake test:node` — Node.js support unit tests
9
+ - `rake test:cxx` and `rake test:oxt` — C++ unit tests (requires `test/config.json`, see [Development environment setup](DevEnvironmentSetup.md)). See also [Advanced C++ test suite usage](#advanced-c-test-suite-usage).
10
+ - `rake test:integration:apache2` — Apache 2 integration tests
11
+ - `rake test:integration:nginx` — Nginx integration tests
12
+ - `rake test:integration:standalone` — Passenger Standalone integration tests
13
+
14
+ Packaging-specific test suites:
15
+
16
+ - `rake test:integration:native_packaging` — run from Debian and RPM packaging automation.
17
+ - `rake test:source_packaging` — run from gem and source tarball packaging automation.
18
+
19
+ > [!NOTE]
20
+ > Some tests, such as the ones about privilege lowering, require root. Those will only be run if Rake is run as root. For running `test:cxx` in root specifically, use `SUDO=1` (see below).
21
+
22
+ > [!NOTE]
23
+ > When choosing to bypass Rake, ensure running tests from `test/`.
24
+
25
+ ## Apache 2 integration test suite usage
26
+
27
+ To run specific tests, use either the `E` or `LOC` environment variables:
28
+
29
+ ```bash
30
+ # Match on test name. Passed to `rspec -e`
31
+ rake test:integration:apache2 E="doesn't use page caching if the HTTP request is not GET"
32
+
33
+ # Match on file name and line numbers. Passed to `rspec`. Note: filename is relative to `test/`
34
+ rake test:integration:apache2 "./integration_tests/apache2_tests.rb[1:3:5]"
35
+ ```
36
+
37
+ ## Advanced C++ test suite usage
38
+
39
+ The `test:cxx` unit test suite contains many different test groups. To run a specific one, set the environment variable `GROUPS` to a comma-delimited list of group names:
40
+
41
+ ```bash
42
+ rake test:cxx GROUPS='ApplicationPool2_PoolTest,UtilsTest'
43
+ ```
44
+
45
+ To run specific tests within a suite., pass the relevant test number(s):
46
+
47
+ ```bash
48
+ rake test:cxx GROUPS='ApplicationPool2_PoolTest:82,83'
49
+ ```
50
+
51
+ To run them in GDB, LLDB or Valgrind:
52
+
53
+ ```bash
54
+ rake test:cxx GDB=1
55
+ rake test:cxx LLDB=1
56
+ rake test:cxx VALGRIND=1
57
+ ```
58
+
59
+ > [!TIP]
60
+ > See [Development environment setup](DevEnvironmentSetup.md) for setting up our recommended GDB config file.
61
+
62
+ Some tests, such as the ones about privilege lowering, require root. To run compilation commands as a normal user, and only the test suite as root:
63
+
64
+ ```bash
65
+ rake test:cxx SUDO=1
66
+ ```
67
+
68
+ ## Example `test:cxx` output
69
+
70
+ Output format is modified from the original Tut test framework.
71
+
72
+ ```
73
+ SystemTools_ProcessMetricsCollectorTest:
74
+ 1... ✔
75
+ 2... ✔
76
+ 3... ✗
77
+ 4... skipped
78
+
79
+ VariantMapTest:
80
+ 1... ✔
81
+ 8... skipped
82
+
83
+ ---> group: SystemTools_ProcessMetricsCollectorTest, test: test<3>
84
+ problem: assertion failed
85
+ failed assertion: "PSS is correct"
86
+
87
+ tests summary: failures:1 ok:851
88
+ ```
@@ -1,4 +1,4 @@
1
- # Handling of temp files
1
+ # Secure handling of temp files
2
2
 
3
3
  Always use unpredictable filenames for temp files. Failing to do so makes us vulnerable to symlink attacks, TOCTOU race conditions, file squatting, or even information disclosure and privilege escalation.
4
4
 
@@ -1,4 +1,4 @@
1
- # C++ testing guide
1
+ # Writing C++ tests
2
2
 
3
3
  C++ tests use a modified version of the [Tut test framework](https://mrzechonek.github.io/tut-framework/).
4
4
 
@@ -89,22 +89,3 @@ namespace tut {
89
89
  ## Mocking
90
90
 
91
91
  See [C++ mocking strategy](CxxMockingStrategy.md).
92
-
93
- ## Running tests
94
-
95
- Prerequisite: ensure `test/config.json` exists. Refer to its `.example` file.
96
-
97
- ```bash
98
- # Run all test suites
99
- rake test:cxx GROUPS=SomethingTest
100
-
101
- # Run specific test suites
102
- rake test:cxx GROUPS=SomethingTest,AnotherTest
103
-
104
- # Run specific tests by number
105
- rake test:cxx GROUPS=SomethingTest:1,3
106
-
107
- # Attach to GDB or LLDB
108
- rake test:cxx GROUPS=SomethingTest GDB=1
109
- rake test:cxx GROUPS=SomethingTest LLDB=1
110
- ```