passenger 5.3.5 → 5.3.6

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 (211) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +13 -0
  3. data/README.md +2 -1
  4. data/Rakefile +0 -5
  5. data/build/agent.rb +2 -1
  6. data/build/cxx_tests.rb +18 -20
  7. data/build/integration_tests.rb +6 -2
  8. data/build/support/cxx_dependency_map.rb +2019 -1966
  9. data/dev/colorize-logs +272 -0
  10. data/src/agent/Core/AdminPanelConnector.h +3 -3
  11. data/src/agent/Core/ApiServer.h +4 -4
  12. data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +2 -2
  13. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +2 -2
  14. data/src/agent/Core/ApplicationPool/Implementation.cpp +5 -5
  15. data/src/agent/Core/ApplicationPool/Pool.h +4 -4
  16. data/src/agent/Core/ApplicationPool/Process.h +10 -15
  17. data/src/agent/Core/ApplicationPool/Socket.h +2 -2
  18. data/src/agent/Core/ApplicationPool/TestSession.h +3 -3
  19. data/src/agent/Core/Config.h +4 -2
  20. data/src/agent/Core/Controller.h +4 -4
  21. data/src/agent/Core/Controller/Config.h +1 -1
  22. data/src/agent/Core/Controller/SendRequest.cpp +2 -2
  23. data/src/agent/Core/Controller/TurboCaching.h +2 -2
  24. data/src/agent/Core/CoreMain.cpp +2 -2
  25. data/src/agent/Core/OptionParser.h +2 -2
  26. data/src/agent/Core/ResponseCache.h +3 -3
  27. data/src/agent/Core/SecurityUpdateChecker.h +2 -2
  28. data/src/agent/Core/SpawningKit/Config.h +2 -1
  29. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +1 -1
  30. data/src/agent/Core/SpawningKit/Context.h +1 -1
  31. data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -3
  32. data/src/agent/Core/SpawningKit/DummySpawner.h +3 -3
  33. data/src/agent/Core/SpawningKit/ErrorRenderer.h +1 -1
  34. data/src/agent/Core/SpawningKit/Exceptions.h +2 -2
  35. data/src/agent/Core/SpawningKit/Factory.h +1 -1
  36. data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +1 -1
  37. data/src/agent/Core/SpawningKit/Handshake/Perform.h +13 -2
  38. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +3 -3
  39. data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +1 -1
  40. data/src/agent/Core/SpawningKit/Journey.h +4 -5
  41. data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
  42. data/src/agent/Core/SpawningKit/Result.h +20 -8
  43. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +1 -1
  44. data/src/agent/Core/SpawningKit/SmartSpawner.h +6 -6
  45. data/src/agent/Core/SpawningKit/Spawner.h +2 -2
  46. data/src/agent/Core/TelemetryCollector.h +13 -7
  47. data/src/agent/ExecHelper/ExecHelperMain.cpp +1 -1
  48. data/src/agent/README.md +1 -1
  49. data/src/agent/Shared/ApiAccountUtils.h +1 -1
  50. data/src/agent/Shared/ApiServerUtils.h +3 -3
  51. data/src/agent/Shared/ApplicationPoolApiKey.h +2 -2
  52. data/src/agent/Shared/Fundamentals/Initialization.cpp +4 -4
  53. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +1 -1
  54. data/src/agent/SystemMetrics/SystemMetricsMain.cpp +4 -3
  55. data/src/agent/Watchdog/ApiServer.h +3 -3
  56. data/src/agent/Watchdog/Config.h +3 -2
  57. data/src/agent/Watchdog/CoreWatcher.cpp +2 -2
  58. data/src/agent/Watchdog/WatchdogMain.cpp +93 -27
  59. data/src/apache2_module/Config.cpp +14 -14
  60. data/src/apache2_module/Config.h +8 -16
  61. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +505 -491
  62. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder +39 -17
  63. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +24 -1
  64. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +31 -1
  65. data/src/{cxx_supportlib/Utils/MemoryBarrier.h → apache2_module/ConfigGeneral/Common.h} +17 -25
  66. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +12 -1
  67. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder +16 -1
  68. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +19 -5
  69. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder +26 -9
  70. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +6 -1
  71. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +10 -1
  72. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -1
  73. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +11 -1
  74. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +23 -1
  75. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +34 -1
  76. data/src/apache2_module/Hooks.cpp +3 -3
  77. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +24 -1
  78. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +36 -1
  79. data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.cpp +2 -2
  80. data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.h +4 -4
  81. data/src/cxx_supportlib/AppTypeDetector/Detector.h +1 -1
  82. data/src/cxx_supportlib/ConfigKit/Schema.h +2 -2
  83. data/src/cxx_supportlib/ConfigKit/Store.h +1 -1
  84. data/src/cxx_supportlib/Constants.h +1 -1
  85. data/src/cxx_supportlib/{Utils → DataStructures}/HashMap.h +4 -4
  86. data/src/cxx_supportlib/DataStructures/HashedStaticString.h +5 -5
  87. data/src/cxx_supportlib/DataStructures/LString.h +3 -3
  88. data/src/cxx_supportlib/{Utils → DataStructures}/StringMap.h +36 -36
  89. data/src/cxx_supportlib/FileTools/FileManip.cpp +1 -1
  90. data/src/cxx_supportlib/FileTools/PathManip.cpp +2 -2
  91. data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +1 -1
  92. data/src/cxx_supportlib/Hooks.h +2 -2
  93. data/src/cxx_supportlib/{Utils → IOTools}/BufferedIO.h +5 -5
  94. data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.cpp +2 -2
  95. data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.h +3 -3
  96. data/src/cxx_supportlib/{Utils → IOTools}/MessageIO.h +7 -7
  97. data/src/cxx_supportlib/{MessageReadersWriters.h → IOTools/MessageSerialization.h} +5 -5
  98. data/src/cxx_supportlib/InstanceDirectory.h +4 -4
  99. data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +3 -3
  100. data/src/cxx_supportlib/{Utils → JsonTools}/JsonUtils.h +5 -5
  101. data/src/cxx_supportlib/LoggingKit/Context.h +2 -2
  102. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +3 -3
  103. data/src/cxx_supportlib/MemoryKit/mbuf.cpp +2 -2
  104. data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +5 -5
  105. data/src/cxx_supportlib/ProcessManagement/Utils.h +10 -0
  106. data/src/cxx_supportlib/RandomGenerator.h +2 -2
  107. data/src/cxx_supportlib/{Crypto.cpp → SecurityKit/Crypto.cpp} +4 -4
  108. data/src/cxx_supportlib/{Crypto.h → SecurityKit/Crypto.h} +4 -4
  109. data/src/cxx_supportlib/{Utils → SecurityKit}/MemZeroGuard.h +0 -0
  110. data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +2 -2
  111. data/src/cxx_supportlib/ServerKit/Channel.h +1 -1
  112. data/src/cxx_supportlib/ServerKit/Context.h +2 -2
  113. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +1 -1
  114. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +3 -3
  115. data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +2 -2
  116. data/src/cxx_supportlib/ServerKit/HttpServer.h +16 -10
  117. data/src/cxx_supportlib/ServerKit/Server.h +3 -3
  118. data/src/cxx_supportlib/{Utils → StrIntTools}/DateParsing.h +5 -5
  119. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.cpp +3 -3
  120. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.h +0 -0
  121. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtilsNoStrictAliasing.cpp +2 -2
  122. data/src/cxx_supportlib/{Utils → StrIntTools}/StringScanning.h +5 -5
  123. data/src/cxx_supportlib/{Utils → StrIntTools}/Template.h +30 -5
  124. data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +34 -0
  125. data/src/cxx_supportlib/{Utils → SystemTools}/ProcessMetricsCollector.h +6 -6
  126. data/src/cxx_supportlib/{Utils → SystemTools}/SystemMetricsCollector.h +3 -3
  127. data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.cpp +1 -1
  128. data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.h +0 -0
  129. data/src/cxx_supportlib/SystemTools/UserDatabase.h +1 -1
  130. data/src/cxx_supportlib/Utils.cpp +2 -2
  131. data/src/cxx_supportlib/Utils/CachedFileStat.hpp +3 -3
  132. data/src/cxx_supportlib/Utils/Curl.h +2 -2
  133. data/src/cxx_supportlib/Utils/FileChangeChecker.h +2 -2
  134. data/src/cxx_supportlib/Utils/MessagePassing.h +1 -1
  135. data/src/cxx_supportlib/Utils/SpeedMeter.h +2 -2
  136. data/src/cxx_supportlib/Utils/Timer.h +2 -2
  137. data/src/cxx_supportlib/Utils/VariantMap.h +3 -3
  138. data/src/cxx_supportlib/WatchdogLauncher.h +3 -3
  139. data/src/cxx_supportlib/WebSocketCommandReverseServer.h +1 -1
  140. data/src/cxx_supportlib/WrapperRegistry/Registry.h +1 -1
  141. data/src/cxx_supportlib/vendor-modified/psg_sysqueue.h +3 -0
  142. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  143. data/src/ruby_supportlib/phusion_passenger/common_library.rb +11 -11
  144. data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +4 -4
  145. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +1 -1
  146. data/src/ruby_supportlib/phusion_passenger/message_channel.rb +2 -2
  147. data/src/ruby_supportlib/phusion_passenger/packaging.rb +20 -19
  148. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +22 -4
  149. data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +33 -13
  150. data/src/schema_printer/SchemaPrinterMain.cpp +2 -0
  151. metadata +28 -86
  152. data/.editorconfig +0 -134
  153. data/CODE_OF_CONDUCT.md +0 -52
  154. data/dev/boost-patches/0001-Patch-boost-thread-so-that-oxt-thread-can-use-it.patch +0 -48
  155. data/dev/boost-patches/0002-Make-boost-thread_interrupted-derive-from-oxt-tracab.patch +0 -33
  156. data/dev/boost-patches/0003-Disable-a-Clang-pragma-to-prevent-warnings-on-OS-X.patch +0 -25
  157. data/dev/ci/README.md +0 -134
  158. data/dev/ci/lib/functions.sh +0 -129
  159. data/dev/ci/lib/set-container-envvars.sh +0 -53
  160. data/dev/ci/lib/setup-container.sh +0 -46
  161. data/dev/ci/run-tests-natively +0 -24
  162. data/dev/ci/run-tests-with-docker +0 -42
  163. data/dev/ci/scripts/debug-console-wrapper.sh +0 -29
  164. data/dev/ci/scripts/docker-entrypoint-stage2.sh +0 -17
  165. data/dev/ci/scripts/docker-entrypoint.sh +0 -17
  166. data/dev/ci/scripts/inituidgid +0 -17
  167. data/dev/ci/scripts/run-tests-natively-stage2.sh +0 -17
  168. data/dev/ci/scripts/setup-host-natively.sh +0 -11
  169. data/dev/ci/setup-host +0 -56
  170. data/dev/ci/tests/apache2/run +0 -6
  171. data/dev/ci/tests/apache2/setup +0 -4
  172. data/dev/ci/tests/binaries/Jenkinsfile +0 -105
  173. data/dev/ci/tests/binaries/build-linux +0 -38
  174. data/dev/ci/tests/binaries/build-macos +0 -40
  175. data/dev/ci/tests/binaries/prepare-macos +0 -38
  176. data/dev/ci/tests/binaries/test-linux +0 -45
  177. data/dev/ci/tests/binaries/test-macos +0 -38
  178. data/dev/ci/tests/cxx/run +0 -9
  179. data/dev/ci/tests/cxx/setup +0 -4
  180. data/dev/ci/tests/debian/Jenkinsfile +0 -89
  181. data/dev/ci/tests/debian/run +0 -60
  182. data/dev/ci/tests/nginx-dynamic/run +0 -20
  183. data/dev/ci/tests/nginx-dynamic/setup +0 -4
  184. data/dev/ci/tests/nginx/run +0 -5
  185. data/dev/ci/tests/nginx/setup +0 -4
  186. data/dev/ci/tests/nodejs/run +0 -4
  187. data/dev/ci/tests/nodejs/setup +0 -4
  188. data/dev/ci/tests/rpm/Jenkinsfile +0 -68
  189. data/dev/ci/tests/rpm/run +0 -63
  190. data/dev/ci/tests/ruby/run +0 -4
  191. data/dev/ci/tests/ruby/setup +0 -4
  192. data/dev/ci/tests/source-packaging/run +0 -4
  193. data/dev/ci/tests/source-packaging/setup +0 -4
  194. data/dev/ci/tests/standalone/run +0 -4
  195. data/dev/ci/tests/standalone/setup +0 -4
  196. data/dev/configkit-schemas/index.json +0 -1850
  197. data/dev/configkit-schemas/update_schema_inline_comments.rb +0 -118
  198. data/dev/rack.test/config.ru +0 -5
  199. data/dev/rack.test/public/asset.txt +0 -1
  200. data/dev/vagrant/apache_default_site.conf +0 -35
  201. data/dev/vagrant/apache_passenger.conf +0 -5
  202. data/dev/vagrant/apache_passenger.load +0 -1
  203. data/dev/vagrant/apache_ports.conf +0 -24
  204. data/dev/vagrant/apache_rack_test.conf +0 -9
  205. data/dev/vagrant/bashrc +0 -23
  206. data/dev/vagrant/nginx.conf +0 -39
  207. data/dev/vagrant/nginx_rakefile +0 -33
  208. data/dev/vagrant/nginx_start +0 -32
  209. data/dev/vagrant/provision.sh +0 -117
  210. data/dev/vagrant/sudoers.conf +0 -5
  211. data/resources/templates/error_renderer/.editorconfig +0 -19
@@ -44,7 +44,7 @@
44
44
  #include <ProcessManagement/Utils.h>
45
45
  #include <Utils.h> // parseModeString
46
46
  #include <Utils/CachedFileStat.hpp>
47
- #include <Utils/IOUtils.h>
47
+ #include <IOTools/IOUtils.h>
48
48
  #include <Utils/ScopeGuard.h>
49
49
 
50
50
  namespace Passenger {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -36,7 +36,7 @@
36
36
 
37
37
  #include <FileTools/PathManip.h>
38
38
  #include <Exceptions.h>
39
- #include <Utils/StrIntUtils.h>
39
+ #include <StrIntTools/StrIntUtils.h>
40
40
 
41
41
  namespace Passenger {
42
42
 
@@ -33,7 +33,7 @@
33
33
  #include <FileTools/PathManip.h>
34
34
  #include <SystemTools/UserDatabase.h>
35
35
  #include <Utils.h>
36
- #include <Utils/StrIntUtils.h>
36
+ #include <StrIntTools/StrIntUtils.h>
37
37
 
38
38
  namespace Passenger {
39
39
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -46,7 +46,7 @@
46
46
  #include <ProcessManagement/Spawn.h>
47
47
  #include <ProcessManagement/Utils.h>
48
48
  #include <Utils.h>
49
- #include <Utils/StrIntUtils.h>
49
+ #include <StrIntTools/StrIntUtils.h>
50
50
 
51
51
  namespace Passenger {
52
52
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -23,8 +23,8 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
- #ifndef _PASSENGER_BUFFERED_IO_H_
27
- #define _PASSENGER_BUFFERED_IO_H_
26
+ #ifndef _PASSENGER_IOTOOLS_BUFFERED_IO_H_
27
+ #define _PASSENGER_IOTOOLS_BUFFERED_IO_H_
28
28
 
29
29
  #include <string>
30
30
  #include <utility>
@@ -38,7 +38,7 @@
38
38
  #include <FileDescriptor.h>
39
39
  #include <Exceptions.h>
40
40
  #include <StaticString.h>
41
- #include <Utils/IOUtils.h>
41
+ #include <IOTools/IOUtils.h>
42
42
 
43
43
  namespace Passenger {
44
44
 
@@ -249,4 +249,4 @@ public:
249
249
 
250
250
  } // namespace Passenger
251
251
 
252
- #endif /* _PASSENGER_BUFFERED_IO_H_ */
252
+ #endif /* _PASSENGER_IOTOOLS_BUFFERED_IO_H_ */
@@ -68,8 +68,8 @@
68
68
  #include <Exceptions.h>
69
69
  #include <Constants.h>
70
70
  #include <Utils/Timer.h>
71
- #include <Utils/IOUtils.h>
72
- #include <Utils/StrIntUtils.h>
71
+ #include <IOTools/IOUtils.h>
72
+ #include <StrIntTools/StrIntUtils.h>
73
73
  #include <Utils/ScopeGuard.h>
74
74
 
75
75
  namespace Passenger {
@@ -23,8 +23,8 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
- #ifndef _PASSENGER_IO_UTILS_H_
27
- #define _PASSENGER_IO_UTILS_H_
26
+ #ifndef _PASSENGER_IOTOOLS_IO_UTILS_H_
27
+ #define _PASSENGER_IOTOOLS_IO_UTILS_H_
28
28
 
29
29
  #include <sys/types.h>
30
30
  #include <sys/socket.h>
@@ -658,4 +658,4 @@ pair<string, bool> readAll(int fd, size_t maxSize);
658
658
 
659
659
  } // namespace Passenger
660
660
 
661
- #endif /* _PASSENGER_IO_UTILS_H_ */
661
+ #endif /* _PASSENGER_IOTOOLS_IO_UTILS_H_ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2011-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2011-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -23,8 +23,8 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
- #ifndef _PASSENGER_MESSAGE_IO_H_
27
- #define _PASSENGER_MESSAGE_IO_H_
26
+ #ifndef _PASSENGER_IOTOOLS_MESSAGE_IO_H_
27
+ #define _PASSENGER_IOTOOLS_MESSAGE_IO_H_
28
28
 
29
29
  /**
30
30
  * This file contains functions for reading and writing structured messages over
@@ -90,10 +90,10 @@
90
90
 
91
91
  #include <StaticString.h>
92
92
  #include <Exceptions.h>
93
- #include <Utils/MemZeroGuard.h>
93
+ #include <SecurityKit/MemZeroGuard.h>
94
94
  #include <Utils/ScopeGuard.h>
95
- #include <Utils/IOUtils.h>
96
- #include <Utils/StrIntUtils.h>
95
+ #include <IOTools/IOUtils.h>
96
+ #include <StrIntTools/StrIntUtils.h>
97
97
 
98
98
 
99
99
  namespace Passenger {
@@ -664,4 +664,4 @@ writeFileDescriptorWithNegotiation(int fd, int fdToPass, unsigned long long *tim
664
664
 
665
665
  } // namespace Passenger
666
666
 
667
- #endif /* _PASSENGER_MESSAGE_IO_H_ */
667
+ #endif /* _PASSENGER_IOTOOLS_MESSAGE_IO_H_ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -23,8 +23,8 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
- #ifndef _PASSENGER_MESSAGE_READERS_WRITERS_H_
27
- #define _PASSENGER_MESSAGE_READERS_WRITERS_H_
26
+ #ifndef _PASSENGER_IOTOOLS_MESSAGE_SERIALIZATION_H_
27
+ #define _PASSENGER_IOTOOLS_MESSAGE_SERIALIZATION_H_
28
28
 
29
29
  #include <boost/cstdint.hpp>
30
30
  #include <oxt/macros.hpp>
@@ -36,7 +36,7 @@
36
36
  #include <arpa/inet.h>
37
37
  #include <StaticString.h>
38
38
  #include <Exceptions.h>
39
- #include <Utils/MemZeroGuard.h>
39
+ #include <SecurityKit/MemZeroGuard.h>
40
40
 
41
41
  /**
42
42
  * This file provides a bunch of classes for reading and writing messages in the
@@ -544,4 +544,4 @@ public:
544
544
 
545
545
  } // namespace Passenger
546
546
 
547
- #endif /* _PASSENGER_MESSAGE_READERS_WRITERS_H_ */
547
+ #endif /* _PASSENGER_IOTOOLS_MESSAGE_SERIALIZATION_H_ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2014-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2014-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -44,9 +44,9 @@
44
44
  #include <RandomGenerator.h>
45
45
  #include <FileTools/FileManip.h>
46
46
  #include <Utils.h>
47
- #include <Utils/StrIntUtils.h>
48
- #include <Utils/IOUtils.h>
49
- #include <Utils/SystemTime.h>
47
+ #include <StrIntTools/StrIntUtils.h>
48
+ #include <IOTools/IOUtils.h>
49
+ #include <SystemTools/SystemTime.h>
50
50
  #include <jsoncpp/json.h>
51
51
 
52
52
  namespace Passenger {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2016-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2016-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -30,8 +30,8 @@
30
30
  #include <jsoncpp/json.h>
31
31
  #include <cstring>
32
32
  #include <ctime>
33
- #include <Utils/StrIntUtils.h>
34
- #include <Utils/SystemTime.h>
33
+ #include <StrIntTools/StrIntUtils.h>
34
+ #include <SystemTools/SystemTime.h>
35
35
 
36
36
  namespace Passenger {
37
37
 
@@ -23,8 +23,8 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
- #ifndef _PASSENGER_UTILS_JSON_UTILS_H_
27
- #define _PASSENGER_UTILS_JSON_UTILS_H_
26
+ #ifndef _PASSENGER_JSON_TOOLS_JSON_UTILS_H_
27
+ #define _PASSENGER_JSON_TOOLS_JSON_UTILS_H_
28
28
 
29
29
  #include <string>
30
30
  #include <cstdio>
@@ -33,8 +33,8 @@
33
33
  #include <jsoncpp/json.h>
34
34
  #include <boost/cstdint.hpp>
35
35
  #include <StaticString.h>
36
- #include <Utils/SystemTime.h>
37
- #include <Utils/StrIntUtils.h>
36
+ #include <SystemTools/SystemTime.h>
37
+ #include <StrIntTools/StrIntUtils.h>
38
38
  #include <Utils/VariantMap.h>
39
39
 
40
40
  namespace Passenger {
@@ -467,4 +467,4 @@ byteSizeAndCountToJson(size_t size, unsigned int count) {
467
467
 
468
468
  } // namespace Passenger
469
469
 
470
- #endif /* _PASSENGER_UTILS_JSON_UTILS_H_ */
470
+ #endif /* _PASSENGER_JSON_TOOLS_JSON_UTILS_H_ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2017 Phusion Holding B.V.
3
+ * Copyright (c) 2017-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -37,7 +37,7 @@
37
37
  #include <ConfigKit/ConfigKit.h>
38
38
  #include <LoggingKit/Forward.h>
39
39
  #include <LoggingKit/Config.h>
40
- #include <Utils/SystemTime.h>
40
+ #include <SystemTools/SystemTime.h>
41
41
  #include <DataStructures/StringKeyTable.h>
42
42
 
43
43
  namespace Passenger {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -56,8 +56,8 @@
56
56
  #include <ConfigKit/ConfigKit.h>
57
57
  #include <FileTools/PathManip.h>
58
58
  #include <Utils.h>
59
- #include <Utils/StrIntUtils.h>
60
- #include <Utils/SystemTime.h>
59
+ #include <StrIntTools/StrIntUtils.h>
60
+ #include <SystemTools/SystemTime.h>
61
61
 
62
62
  namespace Passenger {
63
63
  namespace LoggingKit {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * twemproxy - A fast and lightweight proxy for memcached protocol.
3
3
  * Copyright (C) 2011 Twitter, Inc.
4
- * Copyright (C) 2014-2017 Phusion Holding B.V.
4
+ * Copyright (C) 2014-2018 Phusion Holding B.V.
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
26
26
  #include <MemoryKit/mbuf.h>
27
27
  #include <LoggingKit/LoggingKit.h>
28
28
  #include <StaticString.h>
29
- #include <Utils/StrIntUtils.h>
29
+ #include <StrIntTools/StrIntUtils.h>
30
30
 
31
31
  namespace Passenger {
32
32
  namespace MemoryKit {
@@ -40,7 +40,7 @@
40
40
  #include <ProcessManagement/Utils.h>
41
41
  #include <StaticString.h>
42
42
  #include <Exceptions.h>
43
- #include <Utils/IOUtils.h>
43
+ #include <IOTools/IOUtils.h>
44
44
 
45
45
  namespace Passenger {
46
46
 
@@ -69,14 +69,14 @@ runCommand(const char **command, SubprocessInfo &info, bool wait, bool killSubpr
69
69
  int e, waitStatus;
70
70
  pid_t waitRet;
71
71
 
72
- info.pid = asyncFork();
72
+ info.pid = syscalls::fork();
73
73
  if (info.pid == 0) {
74
74
  resetSignalHandlersAndMask();
75
75
  disableMallocDebugging();
76
76
  if (afterFork) {
77
77
  afterFork();
78
78
  }
79
- closeAllFileDescriptors(2, true);
79
+ closeAllFileDescriptors(2);
80
80
  execvp(command[0], (char * const *) command);
81
81
  if (onExecFail) {
82
82
  onExecFail(command, errno);
@@ -121,7 +121,7 @@ runCommandAndCaptureOutput(const char **command, SubprocessInfo &info,
121
121
 
122
122
  p = createPipe(__FILE__, __LINE__);
123
123
 
124
- info.pid = asyncFork();
124
+ info.pid = syscalls::fork();
125
125
  if (info.pid == 0) {
126
126
  dup2(p[1], 1);
127
127
  close(p[0]);
@@ -131,7 +131,7 @@ runCommandAndCaptureOutput(const char **command, SubprocessInfo &info,
131
131
  if (afterFork) {
132
132
  afterFork();
133
133
  }
134
- closeAllFileDescriptors(2, true);
134
+ closeAllFileDescriptors(2);
135
135
  execvp(command[0], (char * const *) command);
136
136
  if (onExecFail) {
137
137
  onExecFail(command, errno);
@@ -58,6 +58,16 @@ using namespace std;
58
58
  * to grab a lock which was already locked. This means that on macOS
59
59
  * we pretty much can never use regular fork() at all in a multithreaded
60
60
  * environment.
61
+ *
62
+ * As of 2018 May 16 with macOS 10.13 High Sierra, it was confirmed that the
63
+ * use of asyncFork() can lead to the following messages to be printed
64
+ * if the child process allocates memory:
65
+ *
66
+ * malloc: *** mach_vm_map(size=1048576) failed (error code=268435459)
67
+ * malloc: *** error: can't allocate region securely
68
+ * malloc: *** set a breakpoint in malloc_error_break to debug
69
+ *
70
+ * See https://github.com/phusion/passenger/issues/1193#issuecomment-389503928
61
71
  */
62
72
  pid_t asyncFork();
63
73
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -35,7 +35,7 @@
35
35
  #include <LoggingKit/LoggingKit.h>
36
36
  #include <StaticString.h>
37
37
  #include <Exceptions.h>
38
- #include <Utils/StrIntUtils.h>
38
+ #include <StrIntTools/StrIntUtils.h>
39
39
 
40
40
 
41
41
  namespace Passenger {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -24,12 +24,12 @@
24
24
  * THE SOFTWARE.
25
25
  */
26
26
 
27
- #include <Crypto.h>
27
+ #include <SecurityKit/Crypto.h>
28
28
  #include <modp_b64.h>
29
29
  #include <LoggingKit/LoggingKit.h>
30
30
  #include <string>
31
- #include <Utils/SystemTime.h>
32
- #include <Utils/StrIntUtils.h>
31
+ #include <SystemTools/SystemTime.h>
32
+ #include <StrIntTools/StrIntUtils.h>
33
33
 
34
34
  #if BOOST_OS_MACOS
35
35
  #else
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -23,8 +23,8 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
- #ifndef _PASSENGER_CRYPTO_H_
27
- #define _PASSENGER_CRYPTO_H_
26
+ #ifndef _PASSENGER_SECURITY_KIT_CRYPTO_H_
27
+ #define _PASSENGER_SECURITY_KIT_CRYPTO_H_
28
28
 
29
29
  #include <boost/function.hpp>
30
30
  #include <boost/thread.hpp>
@@ -152,4 +152,4 @@ public:
152
152
 
153
153
  } // namespace Passenger
154
154
 
155
- #endif /* _PASSENGER_CRYPTO_H_ */
155
+ #endif /* _PASSENGER_SECURITYKIT_CRYPTO_H_ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2014-2017 Phusion Holding B.V.
3
+ * Copyright (c) 2014-2018 Phusion Holding B.V.
4
4
  *
5
5
  * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  * trademarks of Phusion Holding B.V.
@@ -44,7 +44,7 @@
44
44
  #include <Constants.h>
45
45
  #include <LoggingKit/LoggingKit.h>
46
46
  #include <Utils.h>
47
- #include <Utils/IOUtils.h>
47
+ #include <IOTools/IOUtils.h>
48
48
 
49
49
  namespace Passenger {
50
50
  namespace ServerKit {