passenger 6.2.0 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG +33 -1
- data/CONTRIBUTING.md +7 -311
- data/CONTRIBUTORS +1 -0
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/bin/passenger +1 -1
- data/bin/passenger-config +1 -1
- data/bin/passenger-install-apache2-module +1 -1
- data/bin/passenger-install-nginx-module +4 -9
- data/bin/passenger-memory-stats +1 -1
- data/bin/passenger-status +1 -1
- data/build/agent.rb +13 -15
- data/build/apache2.rb +13 -16
- data/build/basics.rb +10 -13
- data/build/common_library.rb +5 -9
- data/build/cxx_tests.rb +37 -12
- data/build/integration_tests.rb +5 -2
- data/build/misc.rb +1 -1
- data/build/nginx.rb +1 -1
- data/build/node_tests.rb +1 -1
- data/build/oxt_tests.rb +6 -8
- data/build/packaging.rb +1 -1
- data/build/ruby_extension.rb +1 -1
- data/build/ruby_tests.rb +1 -1
- data/build/schema_printer.rb +13 -15
- data/build/support/cplusplus.rb +61 -69
- data/build/support/cxx_dependency_map.rb +2 -1
- data/build/support/general.rb +1 -1
- data/build/support/vendor/cxx_hinted_parser/LICENSE.md +1 -1
- data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser/parser.rb +1 -1
- data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser.rb +1 -1
- data/build/support/vendor/cxxcodebuilder/LICENSE.md +1 -1
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +1 -1
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/initializer_builder.rb +1 -1
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder.rb +1 -1
- data/build/test_basics.rb +1 -1
- data/dev/copy_boost_headers +1 -1
- data/dev/index_cxx_dependencies.rb +5 -1
- data/dev/libev-changes.patch +108 -0
- data/dev/nginx_version_sha256 +1 -1
- data/dev/ruby_server.rb +1 -6
- data/dev/upgrading_libuv.sh +16 -0
- data/doc/BasicArchitectureOverview.md +55 -0
- data/doc/BuildCaching.md +23 -0
- data/doc/BuildSystem.md +49 -0
- data/doc/DebuggingAndStressTesting.md +2 -0
- data/doc/DesignAspects/LimitedGemDependencies.md +1 -0
- data/doc/DevEnvironmentSetup.md +46 -0
- data/doc/DevHandbook.md +28 -0
- data/doc/Packaging.md +1 -1
- data/doc/RunningTests.md +88 -0
- data/doc/{TempFileHandling.md → SecureTempFileHandling.md} +1 -1
- data/doc/{CxxTestingGuide.md → WritingCxxTests.md} +1 -20
- data/src/agent/AgentMain.cpp +1 -1
- data/src/agent/Core/ApiServer.h +1 -1
- data/src/agent/Core/ApplicationPool/AbstractSession.h +1 -1
- data/src/agent/Core/ApplicationPool/BasicGroupInfo.h +1 -1
- data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +1 -1
- data/src/agent/Core/ApplicationPool/Common.h +1 -1
- data/src/agent/Core/ApplicationPool/Context.h +1 -1
- data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/Miscellaneous.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/SessionManagement.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/Verification.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group.h +1 -1
- data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Options.h +1 -1
- data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/ProcessUtils.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool.h +1 -1
- data/src/agent/Core/ApplicationPool/Process.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Process.h +1 -1
- data/src/agent/Core/ApplicationPool/Session.h +1 -1
- data/src/agent/Core/ApplicationPool/Socket.h +1 -1
- data/src/agent/Core/ApplicationPool/TestSession.h +1 -1
- data/src/agent/Core/Config.h +3 -2
- data/src/agent/Core/ConfigChange.cpp +1 -1
- data/src/agent/Core/ConfigChange.h +1 -1
- data/src/agent/Core/Controller/AppResponse.h +1 -1
- data/src/agent/Core/Controller/BufferBody.cpp +1 -1
- data/src/agent/Core/Controller/CheckoutSession.cpp +8 -5
- data/src/agent/Core/Controller/Client.h +1 -1
- data/src/agent/Core/Controller/Config.cpp +1 -1
- data/src/agent/Core/Controller/Config.h +2 -2
- data/src/agent/Core/Controller/ForwardResponse.cpp +2 -2
- data/src/agent/Core/Controller/Hooks.cpp +12 -9
- data/src/agent/Core/Controller/Implementation.cpp +1 -1
- data/src/agent/Core/Controller/InitRequest.cpp +1 -1
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +1 -1
- data/src/agent/Core/Controller/InternalUtils.cpp +1 -1
- data/src/agent/Core/Controller/Miscellaneous.cpp +1 -1
- data/src/agent/Core/Controller/Request.h +1 -1
- data/src/agent/Core/Controller/SendRequest.cpp +1 -1
- data/src/agent/Core/Controller/StateInspection.cpp +1 -1
- data/src/agent/Core/Controller/TurboCaching.h +1 -1
- data/src/agent/Core/Controller.h +1 -1
- data/src/agent/Core/CoreMain.cpp +1 -1
- data/src/agent/Core/OptionParser.h +1 -1
- data/src/agent/Core/ResponseCache.h +1 -1
- data/src/agent/Core/SecurityUpdateChecker.h +1 -1
- data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +1 -1
- data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h.cxxcodebuilder +1 -1
- data/src/agent/Core/SpawningKit/Config.h +1 -1
- data/src/agent/Core/SpawningKit/Context.h +1 -1
- data/src/agent/Core/SpawningKit/DirectSpawner.h +1 -1
- data/src/agent/Core/SpawningKit/DummySpawner.h +1 -1
- data/src/agent/Core/SpawningKit/ErrorRenderer.h +1 -1
- data/src/agent/Core/SpawningKit/Exceptions.h +63 -2
- data/src/agent/Core/SpawningKit/Factory.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/Perform.h +3 -2
- data/src/agent/Core/SpawningKit/Handshake/Prepare.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/Session.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +1 -1
- data/src/agent/Core/SpawningKit/Journey.h +1 -1
- data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
- data/src/agent/Core/SpawningKit/README.md +3 -3
- data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +1 -1
- data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h.cxxcodebuilder +1 -1
- data/src/agent/Core/SpawningKit/Result.h +1 -1
- data/src/agent/Core/SpawningKit/SmartSpawner.h +17 -17
- data/src/agent/Core/SpawningKit/Spawner.h +1 -1
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +1 -1
- data/src/agent/Core/TelemetryCollector.h +1 -1
- data/src/agent/ExecHelper/ExecHelperMain.cpp +1 -1
- data/src/agent/FileReadHelper/FileReadHelperMain.cpp +1 -1
- data/src/agent/MainFunctions.h +1 -1
- data/src/agent/Shared/ApiAccountUtils.h +4 -3
- data/src/agent/Shared/ApiServerUtils.h +1 -2
- data/src/agent/Shared/ApplicationPoolApiKey.h +1 -1
- data/src/agent/Shared/Fundamentals/AbortHandler.cpp +1 -1
- data/src/agent/Shared/Fundamentals/AbortHandler.h +1 -1
- data/src/agent/Shared/Fundamentals/Initialization.cpp +1 -1
- data/src/agent/Shared/Fundamentals/Initialization.h +1 -1
- data/src/agent/Shared/Fundamentals/Utils.cpp +1 -1
- data/src/agent/Shared/Fundamentals/Utils.h +1 -1
- data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +1 -1
- data/src/agent/SystemMetrics/SystemMetricsMain.cpp +1 -1
- data/src/agent/TempDirToucher/TempDirToucherMain.cpp +1 -1
- data/src/agent/Watchdog/ApiServer.h +7 -6
- data/src/agent/Watchdog/Config.h +2 -2
- data/src/apache2_module/Bucket.cpp +1 -1
- data/src/apache2_module/Bucket.h +1 -1
- data/src/apache2_module/CBindings.cpp +1 -1
- data/src/apache2_module/Config.cpp +1 -1
- data/src/apache2_module/Config.h +1 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +104 -104
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder +2 -2
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +1 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +1 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/ConfigGeneral/Common.h +1 -1
- data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +1 -1
- data/src/apache2_module/ConfigGeneral/SetterFuncs.h +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
- data/src/apache2_module/DirectoryMapper.h +1 -1
- data/src/apache2_module/Hooks.cpp +8 -2
- data/src/apache2_module/Hooks.h +1 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +1 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +1 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
- data/src/apache2_module/Utils.h +1 -1
- data/src/apache2_module/mod_passenger.c +1 -1
- data/src/cxx_supportlib/Algorithms/Hasher.cpp +1 -1
- data/src/cxx_supportlib/Algorithms/Hasher.h +1 -1
- data/src/cxx_supportlib/Algorithms/MovingAverage.h +1 -1
- data/src/cxx_supportlib/AppLocalConfigFileUtils.h +1 -1
- data/src/cxx_supportlib/AppTypeDetector/CBindings.cpp +1 -1
- data/src/cxx_supportlib/AppTypeDetector/CBindings.h +1 -1
- data/src/cxx_supportlib/AppTypeDetector/Detector.h +1 -1
- data/src/cxx_supportlib/BackgroundEventLoop.cpp +1 -1
- data/src/cxx_supportlib/BackgroundEventLoop.h +1 -1
- data/src/cxx_supportlib/ConfigKit/AsyncUtils.h +1 -1
- data/src/cxx_supportlib/ConfigKit/Common.h +1 -1
- data/src/cxx_supportlib/ConfigKit/ConfigKit.h +1 -1
- data/src/cxx_supportlib/ConfigKit/DummyTranslator.h +1 -1
- data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +1 -3
- data/src/cxx_supportlib/ConfigKit/PrefixTranslator.h +3 -3
- data/src/cxx_supportlib/ConfigKit/Schema.h +1 -1
- data/src/cxx_supportlib/ConfigKit/SchemaUtils.h +1 -1
- data/src/cxx_supportlib/ConfigKit/Store.h +1 -1
- data/src/cxx_supportlib/ConfigKit/SubComponentUtils.h +1 -1
- data/src/cxx_supportlib/ConfigKit/TableTranslator.h +1 -1
- data/src/cxx_supportlib/ConfigKit/Translator.h +1 -1
- data/src/cxx_supportlib/ConfigKit/Utils.h +1 -1
- data/src/cxx_supportlib/Constants.h +2 -2
- data/src/cxx_supportlib/Constants.h.cxxcodebuilder +1 -1
- data/src/cxx_supportlib/DataStructures/HashedStaticString.h +1 -1
- data/src/cxx_supportlib/DataStructures/LString.cpp +1 -1
- data/src/cxx_supportlib/DataStructures/LString.h +1 -1
- data/src/cxx_supportlib/DataStructures/StringKeyTable.h +1 -1
- data/src/cxx_supportlib/DataStructures/StringMap.h +1 -1
- data/src/cxx_supportlib/Exceptions.cpp +1 -1
- data/src/cxx_supportlib/Exceptions.h +1 -1
- data/src/cxx_supportlib/FileDescriptor.h +1 -1
- data/src/cxx_supportlib/FileTools/FileManip.cpp +1 -1
- data/src/cxx_supportlib/FileTools/FileManip.h +1 -1
- data/src/cxx_supportlib/FileTools/PathManip.cpp +1 -1
- data/src/cxx_supportlib/FileTools/PathManip.h +1 -1
- data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +1 -1
- data/src/cxx_supportlib/FileTools/PathManipCBindings.h +1 -1
- data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +1 -1
- data/src/cxx_supportlib/FileTools/PathSecurityCheck.h +1 -1
- data/src/cxx_supportlib/Hooks.h +1 -1
- data/src/cxx_supportlib/IOTools/BufferedIO.h +1 -1
- data/src/cxx_supportlib/IOTools/IOUtils.cpp +10 -10
- data/src/cxx_supportlib/IOTools/IOUtils.h +1 -1
- data/src/cxx_supportlib/IOTools/MessageIO.h +1 -1
- data/src/cxx_supportlib/IOTools/MessageSerialization.h +1 -1
- data/src/cxx_supportlib/InstanceDirectory.h +1 -1
- data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +1 -1
- data/src/cxx_supportlib/JsonTools/Autocast.h +1 -1
- data/src/cxx_supportlib/JsonTools/CBindings.cpp +1 -1
- data/src/cxx_supportlib/JsonTools/CBindings.h +1 -1
- data/src/cxx_supportlib/JsonTools/JsonUtils.h +1 -1
- data/src/cxx_supportlib/LoggingKit/Assert.h +1 -1
- data/src/cxx_supportlib/LoggingKit/Config.h +2 -1
- data/src/cxx_supportlib/LoggingKit/Context.h +1 -1
- data/src/cxx_supportlib/LoggingKit/Forward.h +1 -1
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +11 -1
- data/src/cxx_supportlib/LoggingKit/Logging.h +1 -1
- data/src/cxx_supportlib/LoggingKit/LoggingKit.h +1 -1
- data/src/cxx_supportlib/LveLoggingDecorator.h +1 -1
- data/src/cxx_supportlib/MemoryKit/mbuf.cpp +1 -1
- data/src/cxx_supportlib/MemoryKit/mbuf.h +1 -1
- data/src/cxx_supportlib/MemoryKit/palloc.cpp +1 -1
- data/src/cxx_supportlib/MemoryKit/palloc.h +1 -1
- data/src/cxx_supportlib/ProcessManagement/Ruby.cpp +1 -1
- data/src/cxx_supportlib/ProcessManagement/Ruby.h +1 -1
- data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +1 -1
- data/src/cxx_supportlib/ProcessManagement/Spawn.h +1 -1
- data/src/cxx_supportlib/ProcessManagement/Utils.cpp +1 -1
- data/src/cxx_supportlib/ProcessManagement/Utils.h +1 -1
- data/src/cxx_supportlib/RandomGenerator.h +1 -1
- data/src/cxx_supportlib/ResourceLocator.h +1 -1
- data/src/cxx_supportlib/SafeLibev.h +1 -1
- data/src/cxx_supportlib/SecurityKit/Crypto.cpp +9 -27
- data/src/cxx_supportlib/SecurityKit/Crypto.h +2 -2
- data/src/cxx_supportlib/SecurityKit/MemZeroGuard.h +1 -1
- data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +1 -1
- data/src/cxx_supportlib/ServerKit/Channel.h +1 -1
- data/src/cxx_supportlib/ServerKit/Client.h +1 -1
- data/src/cxx_supportlib/ServerKit/ClientRef.h +1 -1
- data/src/cxx_supportlib/ServerKit/Config.h +1 -1
- data/src/cxx_supportlib/ServerKit/Context.h +1 -1
- data/src/cxx_supportlib/ServerKit/CookieUtils.h +1 -1
- data/src/cxx_supportlib/ServerKit/Errors.h +1 -1
- data/src/cxx_supportlib/ServerKit/FdSinkChannel.h +1 -1
- data/src/cxx_supportlib/ServerKit/FdSourceChannel.h +1 -1
- data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +54 -2
- data/src/cxx_supportlib/ServerKit/FileBufferedFdSinkChannel.h +1 -1
- data/src/cxx_supportlib/ServerKit/HeaderTable.h +1 -1
- data/src/cxx_supportlib/ServerKit/Hooks.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParser.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParserState.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpClient.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpRequest.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpRequestRef.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpServer.h +1 -1
- data/src/cxx_supportlib/ServerKit/Implementation.cpp +1 -1
- data/src/cxx_supportlib/ServerKit/Server.h +4 -2
- data/src/cxx_supportlib/StaticString.h +1 -1
- data/src/cxx_supportlib/StrIntTools/DateParsing.h +1 -1
- data/src/cxx_supportlib/StrIntTools/StrIntUtils.cpp +1 -1
- data/src/cxx_supportlib/StrIntTools/StrIntUtils.h +1 -1
- data/src/cxx_supportlib/StrIntTools/StrIntUtilsNoStrictAliasing.cpp +1 -1
- data/src/cxx_supportlib/StrIntTools/StringScanning.h +1 -1
- data/src/cxx_supportlib/StrIntTools/Template.h +1 -1
- data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +1 -1
- data/src/cxx_supportlib/SystemTools/ProcessMetricsCollector.h +1 -1
- data/src/cxx_supportlib/SystemTools/SystemMetricsCollector.h +1 -1
- data/src/cxx_supportlib/SystemTools/SystemTime.cpp +1 -1
- data/src/cxx_supportlib/SystemTools/SystemTime.h +1 -1
- data/src/cxx_supportlib/SystemTools/UserDatabase.cpp +1 -1
- data/src/cxx_supportlib/SystemTools/UserDatabase.h +1 -1
- data/src/cxx_supportlib/Utils/AnsiColorConstants.h +1 -1
- data/src/cxx_supportlib/Utils/AsyncSignalSafeUtils.h +1 -1
- data/src/cxx_supportlib/Utils/BlockingQueue.h +1 -1
- data/src/cxx_supportlib/Utils/CachedFileStat.cpp +1 -1
- data/src/cxx_supportlib/Utils/CachedFileStat.h +1 -1
- data/src/cxx_supportlib/Utils/CachedFileStat.hpp +1 -1
- data/src/cxx_supportlib/Utils/ClassUtils.h +1 -1
- data/src/cxx_supportlib/Utils/Curl.h +1 -1
- data/src/cxx_supportlib/Utils/FastStringStream.h +1 -1
- data/src/cxx_supportlib/Utils/FileChangeChecker.h +1 -1
- data/src/cxx_supportlib/Utils/HttpConstants.h +1 -1
- data/src/cxx_supportlib/Utils/IniFile.h +1 -1
- data/src/cxx_supportlib/Utils/MessagePassing.h +1 -1
- data/src/cxx_supportlib/Utils/OptionParsing.h +1 -1
- data/src/cxx_supportlib/Utils/ReleaseableScopedPointer.h +1 -1
- data/src/cxx_supportlib/Utils/ScopeGuard.h +1 -1
- data/src/cxx_supportlib/Utils/SpeedMeter.h +1 -1
- data/src/cxx_supportlib/Utils/Timer.h +1 -1
- data/src/cxx_supportlib/Utils/VariantMap.h +1 -1
- data/src/cxx_supportlib/Utils.cpp +1 -1
- data/src/cxx_supportlib/Utils.h +1 -1
- data/src/cxx_supportlib/WatchdogLauncher.cpp +1 -1
- data/src/cxx_supportlib/WatchdogLauncher.h +1 -1
- data/src/cxx_supportlib/WrapperRegistry/CBindings.cpp +1 -1
- data/src/cxx_supportlib/WrapperRegistry/CBindings.h +1 -1
- data/src/cxx_supportlib/WrapperRegistry/Entry.h +1 -1
- data/src/cxx_supportlib/WrapperRegistry/Registry.h +1 -1
- data/src/cxx_supportlib/oxt/backtrace.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/backtrace_disabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/backtrace_enabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/context.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/tracable_exception_disabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/tracable_exception_enabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/dynamic_thread_group.hpp +1 -1
- data/src/cxx_supportlib/oxt/implementation.cpp +1 -1
- data/src/cxx_supportlib/oxt/initialize.hpp +1 -1
- data/src/cxx_supportlib/oxt/macros.hpp +1 -1
- data/src/cxx_supportlib/oxt/spin_lock.hpp +1 -1
- data/src/cxx_supportlib/oxt/system_calls.cpp +1 -1
- data/src/cxx_supportlib/oxt/system_calls.hpp +1 -1
- data/src/cxx_supportlib/oxt/thread.hpp +1 -1
- data/src/cxx_supportlib/oxt/tracable_exception.hpp +1 -1
- data/src/cxx_supportlib/vendor-copy/adhoc_lve.h +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/AUTHORS +353 -3
- data/src/cxx_supportlib/vendor-copy/libuv/ChangeLog +3981 -2
- data/src/cxx_supportlib/vendor-copy/libuv/LICENSE +1 -28
- data/src/cxx_supportlib/vendor-copy/libuv/LICENSE-docs +396 -0
- data/src/cxx_supportlib/vendor-copy/libuv/LICENSE-extra +36 -0
- data/src/cxx_supportlib/vendor-copy/libuv/Makefile.am +275 -58
- data/src/cxx_supportlib/vendor-copy/libuv/Makefile.in +4380 -2125
- data/src/cxx_supportlib/vendor-copy/libuv/aclocal.m4 +425 -221
- data/src/cxx_supportlib/vendor-copy/libuv/ar-lib +30 -10
- data/src/cxx_supportlib/vendor-copy/libuv/compile +31 -14
- data/src/cxx_supportlib/vendor-copy/libuv/config.guess +1084 -690
- data/src/cxx_supportlib/vendor-copy/libuv/config.sub +1844 -1297
- data/src/cxx_supportlib/vendor-copy/libuv/configure +6935 -3664
- data/src/cxx_supportlib/vendor-copy/libuv/configure.ac +43 -19
- data/src/cxx_supportlib/vendor-copy/libuv/depcomp +12 -11
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-darwin.h → uv/darwin.h} +3 -3
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-errno.h → uv/errno.h} +119 -60
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-linux.h → uv/linux.h} +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/include/uv/os390.h +33 -0
- data/src/cxx_supportlib/vendor-copy/libuv/include/uv/posix.h +31 -0
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-threadpool.h → uv/threadpool.h} +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/include/{tree.h → uv/tree.h} +3 -250
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-unix.h → uv/unix.h} +186 -60
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-version.h → uv/version.h} +3 -3
- data/src/cxx_supportlib/vendor-copy/libuv/include/uv/win.h +703 -0
- data/src/cxx_supportlib/vendor-copy/libuv/include/uv.h +528 -40
- data/src/cxx_supportlib/vendor-copy/libuv/install-sh +110 -70
- data/src/cxx_supportlib/vendor-copy/libuv/libuv-static.pc.in +12 -0
- data/src/cxx_supportlib/vendor-copy/libuv/libuv.pc.in +4 -2
- data/src/cxx_supportlib/vendor-copy/libuv/ltmain.sh +995 -619
- data/src/cxx_supportlib/vendor-copy/libuv/m4/ax_pthread.m4 +485 -0
- data/src/cxx_supportlib/vendor-copy/libuv/m4/libtool.m4 +438 -289
- data/src/cxx_supportlib/vendor-copy/libuv/m4/libuv-check-flags.m4 +21 -4
- data/src/cxx_supportlib/vendor-copy/libuv/m4/libuv-check-versions.m4 +7 -0
- data/src/cxx_supportlib/vendor-copy/libuv/m4/ltoptions.m4 +69 -39
- data/src/cxx_supportlib/vendor-copy/libuv/m4/ltsugar.m4 +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/m4/ltversion.m4 +7 -6
- data/src/cxx_supportlib/vendor-copy/libuv/m4/lt~obsolete.m4 +2 -2
- data/src/cxx_supportlib/vendor-copy/libuv/missing +55 -34
- data/src/cxx_supportlib/vendor-copy/libuv/src/fs-poll.c +52 -20
- data/src/cxx_supportlib/vendor-copy/libuv/src/idna.c +560 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/idna.h +31 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/inet.c +5 -16
- data/src/cxx_supportlib/vendor-copy/libuv/src/queue.h +68 -86
- data/src/cxx_supportlib/vendor-copy/libuv/src/random.c +123 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/strscpy.c +38 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/strscpy.h +39 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/strtok.c +52 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/strtok.h +27 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/thread-common.c +175 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/threadpool.c +172 -57
- data/src/cxx_supportlib/vendor-copy/libuv/src/{unix/timer.c → timer.c} +57 -29
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/aix-common.c +89 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/aix.c +418 -256
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/async.c +168 -129
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/bsd-ifaddrs.c +163 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/bsd-proctitle.c +99 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/core.c +1312 -378
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/cygwin.c +93 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-proctitle.c +18 -32
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-stub.h +97 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-syscalls.h +17 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin.c +41 -139
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/dl.c +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/freebsd.c +75 -235
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/fs.c +1308 -299
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/fsevents.c +150 -148
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/getaddrinfo.c +58 -8
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/getnameinfo.c +3 -2
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/haiku.c +172 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/hurd.c +172 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/ibmi.c +542 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/internal.h +297 -106
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/kqueue.c +325 -94
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux.c +2708 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/loop-watcher.c +11 -11
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/loop.c +105 -24
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/netbsd.c +51 -157
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/no-fsevents.c +42 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/no-proctitle.c +45 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/openbsd.c +42 -183
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-proctitle.c +136 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-syscalls.c +536 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-syscalls.h +75 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390.c +1070 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/pipe.c +324 -55
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/poll.c +58 -11
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/posix-hrtime.c +36 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/posix-poll.c +385 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/process.c +795 -248
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/procfs-exepath.c +45 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/proctitle.c +77 -22
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/qnx.c +142 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-devurandom.c +93 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-getentropy.c +57 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-getrandom.c +86 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-sysctl-linux.c +99 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/signal.c +147 -39
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/stream.c +426 -474
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sunos.c +240 -98
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sysinfo-loadavg.c +36 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sysinfo-memory.c +42 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/tcp.c +402 -91
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/thread.c +497 -145
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/tty.c +269 -45
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/udp.c +695 -165
- data/src/cxx_supportlib/vendor-copy/libuv/src/uv-common.c +463 -61
- data/src/cxx_supportlib/vendor-copy/libuv/src/uv-common.h +248 -44
- data/src/cxx_supportlib/vendor-copy/libuv/src/uv-data-getter-setters.c +119 -0
- data/src/cxx_supportlib/vendor-copy/libuv/tsansupp.txt +2 -0
- data/src/cxx_supportlib/vendor-modified/libev/Changes +109 -0
- data/src/cxx_supportlib/vendor-modified/libev/Makefile.am +2 -1
- data/src/cxx_supportlib/vendor-modified/libev/Makefile.in +47 -33
- data/src/cxx_supportlib/vendor-modified/libev/README +2 -1
- data/src/cxx_supportlib/vendor-modified/libev/aclocal.m4 +1653 -1224
- data/src/cxx_supportlib/vendor-modified/libev/config.guess +376 -316
- data/src/cxx_supportlib/vendor-modified/libev/config.h.in +13 -2
- data/src/cxx_supportlib/vendor-modified/libev/config.sub +156 -154
- data/src/cxx_supportlib/vendor-modified/libev/configure +1431 -940
- data/src/cxx_supportlib/vendor-modified/libev/configure.ac +3 -3
- data/src/cxx_supportlib/vendor-modified/libev/depcomp +5 -5
- data/src/cxx_supportlib/vendor-modified/libev/ev++.h +109 -107
- data/src/cxx_supportlib/vendor-modified/libev/ev.c +807 -319
- data/src/cxx_supportlib/vendor-modified/libev/ev.h +111 -105
- data/src/cxx_supportlib/vendor-modified/libev/ev_epoll.c +42 -29
- data/src/cxx_supportlib/vendor-modified/libev/ev_iouring.c +694 -0
- data/src/cxx_supportlib/vendor-modified/libev/ev_kqueue.c +15 -9
- data/src/cxx_supportlib/vendor-modified/libev/ev_linuxaio.c +620 -0
- data/src/cxx_supportlib/vendor-modified/libev/ev_poll.c +19 -14
- data/src/cxx_supportlib/vendor-modified/libev/ev_port.c +8 -5
- data/src/cxx_supportlib/vendor-modified/libev/ev_select.c +6 -6
- data/src/cxx_supportlib/vendor-modified/libev/ev_vars.h +48 -3
- data/src/cxx_supportlib/vendor-modified/libev/ev_win32.c +2 -2
- data/src/cxx_supportlib/vendor-modified/libev/ev_wrap.h +72 -0
- data/src/cxx_supportlib/vendor-modified/libev/install-sh +23 -13
- data/src/cxx_supportlib/vendor-modified/libev/libev.m4 +6 -1
- data/src/cxx_supportlib/vendor-modified/libev/ltmain.sh +3581 -1993
- data/src/cxx_supportlib/vendor-modified/libev/missing +8 -8
- data/src/cxx_supportlib/vendor-modified/libev/mkinstalldirs +3 -3
- data/src/cxx_supportlib/vendor-modified/modp_b64_strict_aliasing.cpp +1 -1
- data/src/helper-scripts/backtrace-sanitizer.rb +1 -1
- data/src/helper-scripts/crash-watch.rb +1 -1
- data/src/helper-scripts/download_binaries/extconf.rb +1 -1
- data/src/helper-scripts/meteor-loader.rb +1 -1
- data/src/helper-scripts/node-loader.js +1 -1
- data/src/helper-scripts/prespawn +1 -1
- data/src/helper-scripts/rack-loader.rb +1 -1
- data/src/helper-scripts/rack-preloader.rb +1 -1
- data/src/helper-scripts/wsgi-loader.py +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c.cxxcodebuilder +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c.cxxcodebuilder +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c.cxxcodebuilder +1 -1
- data/src/nginx_module/Configuration.c +1 -1
- data/src/nginx_module/Configuration.h +1 -1
- data/src/nginx_module/ContentHandler.c +1 -1
- data/src/nginx_module/ContentHandler.h +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c.cxxcodebuilder +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c.cxxcodebuilder +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
- data/src/nginx_module/StaticContentHandler.c +1 -1
- data/src/nginx_module/StaticContentHandler.h +1 -1
- data/src/nginx_module/ngx_http_passenger_module.c +1 -1
- data/src/nginx_module/ngx_http_passenger_module.h +1 -1
- data/src/nodejs_supportlib/phusion_passenger/line_reader.js +1 -1
- data/src/ruby_native_extension/extconf.rb +1 -1
- data/src/ruby_native_extension/passenger_native_support.c +1 -1
- data/src/ruby_supportlib/phusion_passenger/abstract_installer.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/admin_tools/memory_stats.rb +2 -12
- data/src/ruby_supportlib/phusion_passenger/admin_tools.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +8 -10
- data/src/ruby_supportlib/phusion_passenger/config/about_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/api_call_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/build_native_support_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/compile_agent_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/compile_nginx_engine_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/detach_process_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/install_agent_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/installation_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/list_instances_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/main.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +6 -1
- data/src/ruby_supportlib/phusion_passenger/config/restart_app_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/system_metrics_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/system_properties_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/console_text_template.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/debug_logging.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/message_channel.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/message_client.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/native_support.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +4 -3
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +195 -11
- data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/curl.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/linux.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/networking.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/pcre.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/zlib.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/plugin.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/public_api.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/handler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/out_of_band_gc.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +2 -7
- data/src/ruby_supportlib/phusion_passenger/request_handler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/ruby_core_io_enhancements.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/simple_benchmarking.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/control_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/main.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +4 -8
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/status_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/version_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/ansi_colors.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/download.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/file_system_watcher.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/hosts_file_parser.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/lock.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/native_support_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/progress_bar.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/strscan.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/terminal_choice_menu.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb +3 -13
- data/src/ruby_supportlib/phusion_passenger/utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/app.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/base.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/lldb_controller.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/version.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/lock_file.rb +8 -6
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/spawn.rb +4 -3
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/version.rb +6 -4
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +395 -579
- data/src/ruby_supportlib/phusion_passenger.rb +8 -8
- data/src/schema_printer/SchemaPrinterMain.cpp +1 -1
- data/src/schema_printer/SchemaPrinterMain.cpp.cxxcodebuilder +1 -1
- metadata +69 -32
- data/doc/DeveloperQuickstart.md +0 -70
- data/src/README.md +0 -7
- data/src/cxx_supportlib/vendor-copy/libuv/README.md +0 -245
- data/src/cxx_supportlib/vendor-copy/libuv/checksparse.sh +0 -234
- data/src/cxx_supportlib/vendor-copy/libuv/common.gypi +0 -210
- data/src/cxx_supportlib/vendor-copy/libuv/gyp_uv.py +0 -93
- data/src/cxx_supportlib/vendor-copy/libuv/include/android-ifaddrs.h +0 -54
- data/src/cxx_supportlib/vendor-copy/libuv/include/pthread-fixes.h +0 -72
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/android-ifaddrs.c +0 -703
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/atomic-ops.h +0 -77
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-core.c +0 -899
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-inotify.c +0 -285
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-syscalls.c +0 -471
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-syscalls.h +0 -158
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/pthread-fixes.c +0 -104
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/spinlock.h +0 -53
- data/src/cxx_supportlib/vendor-copy/libuv/uv.gyp +0 -508
- /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-aix.h → uv/aix.h} +0 -0
- /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-bsd.h → uv/bsd.h} +0 -0
- /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-sunos.h → uv/sunos.h} +0 -0
|
@@ -27,20 +27,47 @@
|
|
|
27
27
|
#include <assert.h>
|
|
28
28
|
#include <errno.h>
|
|
29
29
|
|
|
30
|
+
#include <sys/types.h>
|
|
31
|
+
#include <sys/socket.h>
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
/* ifaddrs is not implemented on AIX and IBM i PASE */
|
|
34
|
+
#if !defined(_AIX)
|
|
35
|
+
#include <ifaddrs.h>
|
|
36
|
+
#endif
|
|
37
|
+
|
|
38
|
+
static int maybe_bind_socket(int fd) {
|
|
39
|
+
union uv__sockaddr s;
|
|
40
|
+
socklen_t slen;
|
|
41
|
+
|
|
42
|
+
slen = sizeof(s);
|
|
43
|
+
memset(&s, 0, sizeof(s));
|
|
44
|
+
|
|
45
|
+
if (getsockname(fd, &s.addr, &slen))
|
|
46
|
+
return UV__ERR(errno);
|
|
47
|
+
|
|
48
|
+
if (s.addr.sa_family == AF_INET)
|
|
49
|
+
if (s.in.sin_port != 0)
|
|
50
|
+
return 0; /* Already bound to a port. */
|
|
51
|
+
|
|
52
|
+
if (s.addr.sa_family == AF_INET6)
|
|
53
|
+
if (s.in6.sin6_port != 0)
|
|
54
|
+
return 0; /* Already bound to a port. */
|
|
55
|
+
|
|
56
|
+
/* Bind to an arbitrary port. */
|
|
57
|
+
if (bind(fd, &s.addr, slen))
|
|
58
|
+
return UV__ERR(errno);
|
|
59
|
+
|
|
60
|
+
return 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
static int new_socket(uv_tcp_t* handle, int domain, unsigned int flags) {
|
|
32
65
|
int sockfd;
|
|
33
66
|
int err;
|
|
34
67
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
err = uv__socket(domain, SOCK_STREAM, 0);
|
|
41
|
-
if (err < 0)
|
|
42
|
-
return err;
|
|
43
|
-
sockfd = err;
|
|
68
|
+
sockfd = uv__socket(domain, SOCK_STREAM, 0);
|
|
69
|
+
if (sockfd < 0)
|
|
70
|
+
return sockfd;
|
|
44
71
|
|
|
45
72
|
err = uv__stream_open((uv_stream_t*) handle, sockfd, flags);
|
|
46
73
|
if (err) {
|
|
@@ -48,20 +75,52 @@ static int maybe_new_socket(uv_tcp_t* handle, int domain, int flags) {
|
|
|
48
75
|
return err;
|
|
49
76
|
}
|
|
50
77
|
|
|
78
|
+
if (flags & UV_HANDLE_BOUND)
|
|
79
|
+
return maybe_bind_socket(sockfd);
|
|
80
|
+
|
|
81
|
+
return 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
static int maybe_new_socket(uv_tcp_t* handle, int domain, unsigned int flags) {
|
|
86
|
+
int sockfd;
|
|
87
|
+
int err;
|
|
88
|
+
|
|
89
|
+
if (domain == AF_UNSPEC)
|
|
90
|
+
goto out;
|
|
91
|
+
|
|
92
|
+
sockfd = uv__stream_fd(handle);
|
|
93
|
+
if (sockfd == -1)
|
|
94
|
+
return new_socket(handle, domain, flags);
|
|
95
|
+
|
|
96
|
+
if (!(flags & UV_HANDLE_BOUND))
|
|
97
|
+
goto out;
|
|
98
|
+
|
|
99
|
+
if (handle->flags & UV_HANDLE_BOUND)
|
|
100
|
+
goto out; /* Already bound to a port. */
|
|
101
|
+
|
|
102
|
+
err = maybe_bind_socket(sockfd);
|
|
103
|
+
if (err)
|
|
104
|
+
return err;
|
|
105
|
+
|
|
106
|
+
out:
|
|
107
|
+
|
|
108
|
+
handle->flags |= flags;
|
|
51
109
|
return 0;
|
|
52
110
|
}
|
|
53
111
|
|
|
54
112
|
|
|
55
113
|
int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* tcp, unsigned int flags) {
|
|
56
114
|
int domain;
|
|
115
|
+
int err;
|
|
57
116
|
|
|
58
117
|
/* Use the lower 8 bits for the domain */
|
|
59
118
|
domain = flags & 0xFF;
|
|
60
119
|
if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC)
|
|
61
|
-
return
|
|
120
|
+
return UV_EINVAL;
|
|
62
121
|
|
|
63
122
|
if (flags & ~0xFF)
|
|
64
|
-
return
|
|
123
|
+
return UV_EINVAL;
|
|
65
124
|
|
|
66
125
|
uv__stream_init(loop, (uv_stream_t*)tcp, UV_TCP);
|
|
67
126
|
|
|
@@ -70,9 +129,12 @@ int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* tcp, unsigned int flags) {
|
|
|
70
129
|
*/
|
|
71
130
|
|
|
72
131
|
if (domain != AF_UNSPEC) {
|
|
73
|
-
|
|
132
|
+
err = new_socket(tcp, domain, 0);
|
|
74
133
|
if (err) {
|
|
75
|
-
|
|
134
|
+
uv__queue_remove(&tcp->handle_queue);
|
|
135
|
+
if (tcp->io_watcher.fd != -1)
|
|
136
|
+
uv__close(tcp->io_watcher.fd);
|
|
137
|
+
tcp->io_watcher.fd = -1;
|
|
76
138
|
return err;
|
|
77
139
|
}
|
|
78
140
|
}
|
|
@@ -95,18 +157,23 @@ int uv__tcp_bind(uv_tcp_t* tcp,
|
|
|
95
157
|
|
|
96
158
|
/* Cannot set IPv6-only mode on non-IPv6 socket. */
|
|
97
159
|
if ((flags & UV_TCP_IPV6ONLY) && addr->sa_family != AF_INET6)
|
|
98
|
-
return
|
|
160
|
+
return UV_EINVAL;
|
|
99
161
|
|
|
100
|
-
err = maybe_new_socket(tcp,
|
|
101
|
-
addr->sa_family,
|
|
102
|
-
UV_STREAM_READABLE | UV_STREAM_WRITABLE);
|
|
162
|
+
err = maybe_new_socket(tcp, addr->sa_family, 0);
|
|
103
163
|
if (err)
|
|
104
164
|
return err;
|
|
105
165
|
|
|
106
166
|
on = 1;
|
|
107
167
|
if (setsockopt(tcp->io_watcher.fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)))
|
|
108
|
-
return
|
|
168
|
+
return UV__ERR(errno);
|
|
169
|
+
|
|
170
|
+
if (flags & UV_TCP_REUSEPORT) {
|
|
171
|
+
err = uv__sock_reuseport(tcp->io_watcher.fd);
|
|
172
|
+
if (err)
|
|
173
|
+
return err;
|
|
174
|
+
}
|
|
109
175
|
|
|
176
|
+
#ifndef __OpenBSD__
|
|
110
177
|
#ifdef IPV6_V6ONLY
|
|
111
178
|
if (addr->sa_family == AF_INET6) {
|
|
112
179
|
on = (flags & UV_TCP_IPV6ONLY) != 0;
|
|
@@ -115,21 +182,28 @@ int uv__tcp_bind(uv_tcp_t* tcp,
|
|
|
115
182
|
IPV6_V6ONLY,
|
|
116
183
|
&on,
|
|
117
184
|
sizeof on) == -1) {
|
|
118
|
-
|
|
185
|
+
#if defined(__MVS__)
|
|
186
|
+
if (errno == EOPNOTSUPP)
|
|
187
|
+
return UV_EINVAL;
|
|
188
|
+
#endif
|
|
189
|
+
return UV__ERR(errno);
|
|
119
190
|
}
|
|
120
191
|
}
|
|
192
|
+
#endif
|
|
121
193
|
#endif
|
|
122
194
|
|
|
123
195
|
errno = 0;
|
|
124
|
-
|
|
196
|
+
err = bind(tcp->io_watcher.fd, addr, addrlen);
|
|
197
|
+
if (err == -1 && errno != EADDRINUSE) {
|
|
125
198
|
if (errno == EAFNOSUPPORT)
|
|
126
199
|
/* OSX, other BSDs and SunoS fail with EAFNOSUPPORT when binding a
|
|
127
200
|
* socket created with AF_INET to an AF_INET6 address or vice versa. */
|
|
128
|
-
return
|
|
129
|
-
return
|
|
201
|
+
return UV_EINVAL;
|
|
202
|
+
return UV__ERR(errno);
|
|
130
203
|
}
|
|
131
|
-
tcp->delayed_error = -errno;
|
|
204
|
+
tcp->delayed_error = (err == -1) ? UV__ERR(errno) : 0;
|
|
132
205
|
|
|
206
|
+
tcp->flags |= UV_HANDLE_BOUND;
|
|
133
207
|
if (addr->sa_family == AF_INET6)
|
|
134
208
|
tcp->flags |= UV_HANDLE_IPV6;
|
|
135
209
|
|
|
@@ -137,51 +211,136 @@ int uv__tcp_bind(uv_tcp_t* tcp,
|
|
|
137
211
|
}
|
|
138
212
|
|
|
139
213
|
|
|
214
|
+
static int uv__is_ipv6_link_local(const struct sockaddr* addr) {
|
|
215
|
+
const struct sockaddr_in6* a6;
|
|
216
|
+
uint8_t b[2];
|
|
217
|
+
|
|
218
|
+
if (addr->sa_family != AF_INET6)
|
|
219
|
+
return 0;
|
|
220
|
+
|
|
221
|
+
a6 = (const struct sockaddr_in6*) addr;
|
|
222
|
+
memcpy(b, &a6->sin6_addr, sizeof(b));
|
|
223
|
+
|
|
224
|
+
return b[0] == 0xFE && b[1] == 0x80;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
static int uv__ipv6_link_local_scope_id(void) {
|
|
229
|
+
struct sockaddr_in6* a6;
|
|
230
|
+
int rv;
|
|
231
|
+
#if defined(_AIX)
|
|
232
|
+
/* AIX & IBM i do not have ifaddrs
|
|
233
|
+
* so fallback to use uv_interface_addresses */
|
|
234
|
+
uv_interface_address_t* interfaces;
|
|
235
|
+
uv_interface_address_t* ifa;
|
|
236
|
+
int count, i;
|
|
237
|
+
|
|
238
|
+
if (uv_interface_addresses(&interfaces, &count))
|
|
239
|
+
return 0;
|
|
240
|
+
|
|
241
|
+
rv = 0;
|
|
242
|
+
|
|
243
|
+
for (ifa = interfaces; ifa != &interfaces[count]; ifa++) {
|
|
244
|
+
if (uv__is_ipv6_link_local((struct sockaddr*) &ifa->address)) {
|
|
245
|
+
rv = ifa->address.address6.sin6_scope_id;
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
uv_free_interface_addresses(interfaces, count);
|
|
251
|
+
|
|
252
|
+
#else
|
|
253
|
+
struct ifaddrs* ifa;
|
|
254
|
+
struct ifaddrs* p;
|
|
255
|
+
|
|
256
|
+
if (getifaddrs(&ifa))
|
|
257
|
+
return 0;
|
|
258
|
+
|
|
259
|
+
for (p = ifa; p != NULL; p = p->ifa_next)
|
|
260
|
+
if (p->ifa_addr != NULL)
|
|
261
|
+
if (uv__is_ipv6_link_local(p->ifa_addr))
|
|
262
|
+
break;
|
|
263
|
+
|
|
264
|
+
rv = 0;
|
|
265
|
+
if (p != NULL) {
|
|
266
|
+
a6 = (struct sockaddr_in6*) p->ifa_addr;
|
|
267
|
+
rv = a6->sin6_scope_id;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
freeifaddrs(ifa);
|
|
271
|
+
#endif /* defined(_AIX) */
|
|
272
|
+
|
|
273
|
+
return rv;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
|
|
140
277
|
int uv__tcp_connect(uv_connect_t* req,
|
|
141
278
|
uv_tcp_t* handle,
|
|
142
279
|
const struct sockaddr* addr,
|
|
143
280
|
unsigned int addrlen,
|
|
144
281
|
uv_connect_cb cb) {
|
|
282
|
+
struct sockaddr_in6 tmp6;
|
|
145
283
|
int err;
|
|
146
284
|
int r;
|
|
147
285
|
|
|
148
286
|
assert(handle->type == UV_TCP);
|
|
149
287
|
|
|
150
288
|
if (handle->connect_req != NULL)
|
|
151
|
-
return
|
|
289
|
+
return UV_EALREADY; /* FIXME(bnoordhuis) UV_EINVAL or maybe UV_EBUSY. */
|
|
290
|
+
|
|
291
|
+
if (handle->delayed_error != 0)
|
|
292
|
+
goto out;
|
|
152
293
|
|
|
153
294
|
err = maybe_new_socket(handle,
|
|
154
295
|
addr->sa_family,
|
|
155
|
-
|
|
296
|
+
UV_HANDLE_READABLE | UV_HANDLE_WRITABLE);
|
|
156
297
|
if (err)
|
|
157
298
|
return err;
|
|
158
299
|
|
|
159
|
-
|
|
300
|
+
if (uv__is_ipv6_link_local(addr)) {
|
|
301
|
+
memcpy(&tmp6, addr, sizeof(tmp6));
|
|
302
|
+
if (tmp6.sin6_scope_id == 0) {
|
|
303
|
+
tmp6.sin6_scope_id = uv__ipv6_link_local_scope_id();
|
|
304
|
+
addr = (void*) &tmp6;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
160
307
|
|
|
161
|
-
do
|
|
308
|
+
do {
|
|
309
|
+
errno = 0;
|
|
162
310
|
r = connect(uv__stream_fd(handle), addr, addrlen);
|
|
163
|
-
while (r == -1 && errno == EINTR);
|
|
311
|
+
} while (r == -1 && errno == EINTR);
|
|
164
312
|
|
|
165
|
-
|
|
313
|
+
/* We not only check the return value, but also check the errno != 0.
|
|
314
|
+
* Because in rare cases connect() will return -1 but the errno
|
|
315
|
+
* is 0 (for example, on Android 4.3, OnePlus phone A0001_12_150227)
|
|
316
|
+
* and actually the tcp three-way handshake is completed.
|
|
317
|
+
*/
|
|
318
|
+
if (r == -1 && errno != 0) {
|
|
166
319
|
if (errno == EINPROGRESS)
|
|
167
320
|
; /* not an error */
|
|
168
|
-
else if (errno == ECONNREFUSED
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
321
|
+
else if (errno == ECONNREFUSED
|
|
322
|
+
#if defined(__OpenBSD__)
|
|
323
|
+
|| errno == EINVAL
|
|
324
|
+
#endif
|
|
325
|
+
)
|
|
326
|
+
/* If we get ECONNREFUSED (Solaris) or EINVAL (OpenBSD) wait until the
|
|
327
|
+
* next tick to report the error. Solaris and OpenBSD wants to report
|
|
328
|
+
* immediately -- other unixes want to wait.
|
|
172
329
|
*/
|
|
173
|
-
handle->delayed_error =
|
|
330
|
+
handle->delayed_error = UV__ERR(ECONNREFUSED);
|
|
174
331
|
else
|
|
175
|
-
return
|
|
332
|
+
return UV__ERR(errno);
|
|
176
333
|
}
|
|
177
334
|
|
|
335
|
+
out:
|
|
336
|
+
|
|
178
337
|
uv__req_init(handle->loop, req, UV_CONNECT);
|
|
179
338
|
req->cb = cb;
|
|
180
339
|
req->handle = (uv_stream_t*) handle;
|
|
181
|
-
|
|
340
|
+
uv__queue_init(&req->queue);
|
|
182
341
|
handle->connect_req = req;
|
|
183
342
|
|
|
184
|
-
uv__io_start(handle->loop, &handle->io_watcher,
|
|
343
|
+
uv__io_start(handle->loop, &handle->io_watcher, POLLOUT);
|
|
185
344
|
|
|
186
345
|
if (handle->delayed_error)
|
|
187
346
|
uv__io_feed(handle->loop, &handle->io_watcher);
|
|
@@ -193,87 +352,100 @@ int uv__tcp_connect(uv_connect_t* req,
|
|
|
193
352
|
int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) {
|
|
194
353
|
int err;
|
|
195
354
|
|
|
355
|
+
if (uv__fd_exists(handle->loop, sock))
|
|
356
|
+
return UV_EEXIST;
|
|
357
|
+
|
|
196
358
|
err = uv__nonblock(sock, 1);
|
|
197
359
|
if (err)
|
|
198
360
|
return err;
|
|
199
361
|
|
|
200
362
|
return uv__stream_open((uv_stream_t*)handle,
|
|
201
363
|
sock,
|
|
202
|
-
|
|
364
|
+
UV_HANDLE_READABLE | UV_HANDLE_WRITABLE);
|
|
203
365
|
}
|
|
204
366
|
|
|
205
367
|
|
|
206
368
|
int uv_tcp_getsockname(const uv_tcp_t* handle,
|
|
207
369
|
struct sockaddr* name,
|
|
208
370
|
int* namelen) {
|
|
209
|
-
socklen_t socklen;
|
|
210
371
|
|
|
211
372
|
if (handle->delayed_error)
|
|
212
373
|
return handle->delayed_error;
|
|
213
374
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
socklen = (socklen_t) *namelen;
|
|
219
|
-
|
|
220
|
-
if (getsockname(uv__stream_fd(handle), name, &socklen))
|
|
221
|
-
return -errno;
|
|
222
|
-
|
|
223
|
-
*namelen = (int) socklen;
|
|
224
|
-
return 0;
|
|
375
|
+
return uv__getsockpeername((const uv_handle_t*) handle,
|
|
376
|
+
getsockname,
|
|
377
|
+
name,
|
|
378
|
+
namelen);
|
|
225
379
|
}
|
|
226
380
|
|
|
227
381
|
|
|
228
382
|
int uv_tcp_getpeername(const uv_tcp_t* handle,
|
|
229
383
|
struct sockaddr* name,
|
|
230
384
|
int* namelen) {
|
|
231
|
-
socklen_t socklen;
|
|
232
385
|
|
|
233
386
|
if (handle->delayed_error)
|
|
234
387
|
return handle->delayed_error;
|
|
235
388
|
|
|
236
|
-
|
|
237
|
-
|
|
389
|
+
return uv__getsockpeername((const uv_handle_t*) handle,
|
|
390
|
+
getpeername,
|
|
391
|
+
name,
|
|
392
|
+
namelen);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
int uv_tcp_close_reset(uv_tcp_t* handle, uv_close_cb close_cb) {
|
|
397
|
+
int fd;
|
|
398
|
+
struct linger l = { 1, 0 };
|
|
238
399
|
|
|
239
|
-
/*
|
|
240
|
-
|
|
400
|
+
/* Disallow setting SO_LINGER to zero due to some platform inconsistencies */
|
|
401
|
+
if (uv__is_stream_shutting(handle))
|
|
402
|
+
return UV_EINVAL;
|
|
241
403
|
|
|
242
|
-
|
|
243
|
-
|
|
404
|
+
fd = uv__stream_fd(handle);
|
|
405
|
+
if (0 != setsockopt(fd, SOL_SOCKET, SO_LINGER, &l, sizeof(l))) {
|
|
406
|
+
if (errno == EINVAL) {
|
|
407
|
+
/* Open Group Specifications Issue 7, 2018 edition states that
|
|
408
|
+
* EINVAL may mean the socket has been shut down already.
|
|
409
|
+
* Behavior observed on Solaris, illumos and macOS. */
|
|
410
|
+
errno = 0;
|
|
411
|
+
} else {
|
|
412
|
+
return UV__ERR(errno);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
244
415
|
|
|
245
|
-
*
|
|
416
|
+
uv_close((uv_handle_t*) handle, close_cb);
|
|
246
417
|
return 0;
|
|
247
418
|
}
|
|
248
419
|
|
|
249
420
|
|
|
250
|
-
int
|
|
251
|
-
|
|
421
|
+
int uv__tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb) {
|
|
422
|
+
unsigned int flags;
|
|
252
423
|
int err;
|
|
253
424
|
|
|
254
425
|
if (tcp->delayed_error)
|
|
255
426
|
return tcp->delayed_error;
|
|
256
427
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
err = maybe_new_socket(tcp, AF_INET,
|
|
428
|
+
flags = 0;
|
|
429
|
+
#if defined(__MVS__)
|
|
430
|
+
/* on zOS the listen call does not bind automatically
|
|
431
|
+
if the socket is unbound. Hence the manual binding to
|
|
432
|
+
an arbitrary port is required to be done manually
|
|
433
|
+
*/
|
|
434
|
+
flags |= UV_HANDLE_BOUND;
|
|
435
|
+
#endif
|
|
436
|
+
err = maybe_new_socket(tcp, AF_INET, flags);
|
|
266
437
|
if (err)
|
|
267
438
|
return err;
|
|
268
439
|
|
|
269
440
|
if (listen(tcp->io_watcher.fd, backlog))
|
|
270
|
-
return
|
|
441
|
+
return UV__ERR(errno);
|
|
271
442
|
|
|
272
443
|
tcp->connection_cb = cb;
|
|
444
|
+
tcp->flags |= UV_HANDLE_BOUND;
|
|
273
445
|
|
|
274
446
|
/* Start listening for connections. */
|
|
275
447
|
tcp->io_watcher.cb = uv__server_io;
|
|
276
|
-
uv__io_start(tcp->loop, &tcp->io_watcher,
|
|
448
|
+
uv__io_start(tcp->loop, &tcp->io_watcher, POLLIN);
|
|
277
449
|
|
|
278
450
|
return 0;
|
|
279
451
|
}
|
|
@@ -281,29 +453,126 @@ int uv_tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb) {
|
|
|
281
453
|
|
|
282
454
|
int uv__tcp_nodelay(int fd, int on) {
|
|
283
455
|
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)))
|
|
284
|
-
return
|
|
456
|
+
return UV__ERR(errno);
|
|
285
457
|
return 0;
|
|
286
458
|
}
|
|
287
459
|
|
|
288
460
|
|
|
461
|
+
#if (defined(UV__SOLARIS_11_4) && !UV__SOLARIS_11_4) || \
|
|
462
|
+
(defined(__DragonFly__) && __DragonFly_version < 500702)
|
|
463
|
+
/* DragonFlyBSD <500702 and Solaris <11.4 require millisecond units
|
|
464
|
+
* for TCP keepalive options. */
|
|
465
|
+
#define UV_KEEPALIVE_FACTOR(x) (x *= 1000)
|
|
466
|
+
#else
|
|
467
|
+
#define UV_KEEPALIVE_FACTOR(x)
|
|
468
|
+
#endif
|
|
289
469
|
int uv__tcp_keepalive(int fd, int on, unsigned int delay) {
|
|
470
|
+
int idle;
|
|
471
|
+
int intvl;
|
|
472
|
+
int cnt;
|
|
473
|
+
|
|
474
|
+
(void) &idle;
|
|
475
|
+
(void) &intvl;
|
|
476
|
+
(void) &cnt;
|
|
477
|
+
|
|
290
478
|
if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)))
|
|
291
|
-
return
|
|
479
|
+
return UV__ERR(errno);
|
|
480
|
+
|
|
481
|
+
if (!on)
|
|
482
|
+
return 0;
|
|
483
|
+
|
|
484
|
+
if (delay < 1)
|
|
485
|
+
return UV_EINVAL;
|
|
486
|
+
|
|
487
|
+
#ifdef __sun
|
|
488
|
+
/* The implementation of TCP keep-alive on Solaris/SmartOS is a bit unusual
|
|
489
|
+
* compared to other Unix-like systems.
|
|
490
|
+
* Thus, we need to specialize it on Solaris.
|
|
491
|
+
*
|
|
492
|
+
* There are two keep-alive mechanisms on Solaris:
|
|
493
|
+
* - By default, the first keep-alive probe is sent out after a TCP connection is idle for two hours.
|
|
494
|
+
* If the peer does not respond to the probe within eight minutes, the TCP connection is aborted.
|
|
495
|
+
* You can alter the interval for sending out the first probe using the socket option TCP_KEEPALIVE_THRESHOLD
|
|
496
|
+
* in milliseconds or TCP_KEEPIDLE in seconds.
|
|
497
|
+
* The system default is controlled by the TCP ndd parameter tcp_keepalive_interval. The minimum value is ten seconds.
|
|
498
|
+
* The maximum is ten days, while the default is two hours. If you receive no response to the probe,
|
|
499
|
+
* you can use the TCP_KEEPALIVE_ABORT_THRESHOLD socket option to change the time threshold for aborting a TCP connection.
|
|
500
|
+
* The option value is an unsigned integer in milliseconds. The value zero indicates that TCP should never time out and
|
|
501
|
+
* abort the connection when probing. The system default is controlled by the TCP ndd parameter tcp_keepalive_abort_interval.
|
|
502
|
+
* The default is eight minutes.
|
|
503
|
+
*
|
|
504
|
+
* - The second implementation is activated if socket option TCP_KEEPINTVL and/or TCP_KEEPCNT are set.
|
|
505
|
+
* The time between each consequent probes is set by TCP_KEEPINTVL in seconds.
|
|
506
|
+
* The minimum value is ten seconds. The maximum is ten days, while the default is two hours.
|
|
507
|
+
* The TCP connection will be aborted after certain amount of probes, which is set by TCP_KEEPCNT, without receiving response.
|
|
508
|
+
*/
|
|
509
|
+
|
|
510
|
+
idle = delay;
|
|
511
|
+
/* Kernel expects at least 10 seconds. */
|
|
512
|
+
if (idle < 10)
|
|
513
|
+
idle = 10;
|
|
514
|
+
/* Kernel expects at most 10 days. */
|
|
515
|
+
if (idle > 10*24*60*60)
|
|
516
|
+
idle = 10*24*60*60;
|
|
517
|
+
|
|
518
|
+
UV_KEEPALIVE_FACTOR(idle);
|
|
519
|
+
|
|
520
|
+
/* `TCP_KEEPIDLE`, `TCP_KEEPINTVL`, and `TCP_KEEPCNT` were not available on Solaris
|
|
521
|
+
* until version 11.4, but let's take a chance here. */
|
|
522
|
+
#if defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTVL) && defined(TCP_KEEPCNT)
|
|
523
|
+
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle, sizeof(idle)))
|
|
524
|
+
return UV__ERR(errno);
|
|
525
|
+
|
|
526
|
+
intvl = 10; /* required at least 10 seconds */
|
|
527
|
+
UV_KEEPALIVE_FACTOR(intvl);
|
|
528
|
+
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &intvl, sizeof(intvl)))
|
|
529
|
+
return UV__ERR(errno);
|
|
530
|
+
|
|
531
|
+
cnt = 1; /* 1 retry, ensure (TCP_KEEPINTVL * TCP_KEEPCNT) is 10 seconds */
|
|
532
|
+
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &cnt, sizeof(cnt)))
|
|
533
|
+
return UV__ERR(errno);
|
|
534
|
+
#else
|
|
535
|
+
/* Fall back to the first implementation of tcp-alive mechanism for older Solaris,
|
|
536
|
+
* simulate the tcp-alive mechanism on other platforms via `TCP_KEEPALIVE_THRESHOLD` + `TCP_KEEPALIVE_ABORT_THRESHOLD`.
|
|
537
|
+
*/
|
|
538
|
+
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE_THRESHOLD, &idle, sizeof(idle)))
|
|
539
|
+
return UV__ERR(errno);
|
|
540
|
+
|
|
541
|
+
/* Note that the consequent probes will not be sent at equal intervals on Solaris,
|
|
542
|
+
* but will be sent using the exponential backoff algorithm. */
|
|
543
|
+
int time_to_abort = 10; /* 10 seconds */
|
|
544
|
+
UV_KEEPALIVE_FACTOR(time_to_abort);
|
|
545
|
+
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE_ABORT_THRESHOLD, &time_to_abort, sizeof(time_to_abort)))
|
|
546
|
+
return UV__ERR(errno);
|
|
547
|
+
#endif
|
|
292
548
|
|
|
549
|
+
#else /* !defined(__sun) */
|
|
550
|
+
|
|
551
|
+
idle = delay;
|
|
552
|
+
UV_KEEPALIVE_FACTOR(idle);
|
|
293
553
|
#ifdef TCP_KEEPIDLE
|
|
294
|
-
if (
|
|
295
|
-
return
|
|
554
|
+
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle, sizeof(idle)))
|
|
555
|
+
return UV__ERR(errno);
|
|
556
|
+
#elif defined(TCP_KEEPALIVE)
|
|
557
|
+
/* Darwin/macOS uses TCP_KEEPALIVE in place of TCP_KEEPIDLE. */
|
|
558
|
+
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &idle, sizeof(idle)))
|
|
559
|
+
return UV__ERR(errno);
|
|
296
560
|
#endif
|
|
297
561
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
if (on && setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &delay, sizeof(delay)))
|
|
304
|
-
return -errno;
|
|
562
|
+
#ifdef TCP_KEEPINTVL
|
|
563
|
+
intvl = 1; /* 1 second; same as default on Win32 */
|
|
564
|
+
UV_KEEPALIVE_FACTOR(intvl);
|
|
565
|
+
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &intvl, sizeof(intvl)))
|
|
566
|
+
return UV__ERR(errno);
|
|
305
567
|
#endif
|
|
306
568
|
|
|
569
|
+
#ifdef TCP_KEEPCNT
|
|
570
|
+
cnt = 10; /* 10 retries; same as hardcoded on Win32 */
|
|
571
|
+
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &cnt, sizeof(cnt)))
|
|
572
|
+
return UV__ERR(errno);
|
|
573
|
+
#endif
|
|
574
|
+
|
|
575
|
+
#endif /* !defined(__sun) */
|
|
307
576
|
return 0;
|
|
308
577
|
}
|
|
309
578
|
|
|
@@ -318,9 +587,9 @@ int uv_tcp_nodelay(uv_tcp_t* handle, int on) {
|
|
|
318
587
|
}
|
|
319
588
|
|
|
320
589
|
if (on)
|
|
321
|
-
handle->flags |=
|
|
590
|
+
handle->flags |= UV_HANDLE_TCP_NODELAY;
|
|
322
591
|
else
|
|
323
|
-
handle->flags &= ~
|
|
592
|
+
handle->flags &= ~UV_HANDLE_TCP_NODELAY;
|
|
324
593
|
|
|
325
594
|
return 0;
|
|
326
595
|
}
|
|
@@ -336,9 +605,9 @@ int uv_tcp_keepalive(uv_tcp_t* handle, int on, unsigned int delay) {
|
|
|
336
605
|
}
|
|
337
606
|
|
|
338
607
|
if (on)
|
|
339
|
-
handle->flags |=
|
|
608
|
+
handle->flags |= UV_HANDLE_TCP_KEEPALIVE;
|
|
340
609
|
else
|
|
341
|
-
handle->flags &= ~
|
|
610
|
+
handle->flags &= ~UV_HANDLE_TCP_KEEPALIVE;
|
|
342
611
|
|
|
343
612
|
/* TODO Store delay if uv__stream_fd(handle) == -1 but don't want to enlarge
|
|
344
613
|
* uv_tcp_t with an int that's almost never used...
|
|
@@ -349,10 +618,6 @@ int uv_tcp_keepalive(uv_tcp_t* handle, int on, unsigned int delay) {
|
|
|
349
618
|
|
|
350
619
|
|
|
351
620
|
int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) {
|
|
352
|
-
if (enable)
|
|
353
|
-
handle->flags &= ~UV_TCP_SINGLE_ACCEPT;
|
|
354
|
-
else
|
|
355
|
-
handle->flags |= UV_TCP_SINGLE_ACCEPT;
|
|
356
621
|
return 0;
|
|
357
622
|
}
|
|
358
623
|
|
|
@@ -360,3 +625,49 @@ int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) {
|
|
|
360
625
|
void uv__tcp_close(uv_tcp_t* handle) {
|
|
361
626
|
uv__stream_close((uv_stream_t*)handle);
|
|
362
627
|
}
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
int uv_socketpair(int type, int protocol, uv_os_sock_t fds[2], int flags0, int flags1) {
|
|
631
|
+
uv_os_sock_t temp[2];
|
|
632
|
+
int err;
|
|
633
|
+
#if defined(SOCK_NONBLOCK) && defined(SOCK_CLOEXEC)
|
|
634
|
+
int flags;
|
|
635
|
+
|
|
636
|
+
flags = type | SOCK_CLOEXEC;
|
|
637
|
+
if ((flags0 & UV_NONBLOCK_PIPE) && (flags1 & UV_NONBLOCK_PIPE))
|
|
638
|
+
flags |= SOCK_NONBLOCK;
|
|
639
|
+
|
|
640
|
+
if (socketpair(AF_UNIX, flags, protocol, temp))
|
|
641
|
+
return UV__ERR(errno);
|
|
642
|
+
|
|
643
|
+
if (flags & UV_FS_O_NONBLOCK) {
|
|
644
|
+
fds[0] = temp[0];
|
|
645
|
+
fds[1] = temp[1];
|
|
646
|
+
return 0;
|
|
647
|
+
}
|
|
648
|
+
#else
|
|
649
|
+
if (socketpair(AF_UNIX, type, protocol, temp))
|
|
650
|
+
return UV__ERR(errno);
|
|
651
|
+
|
|
652
|
+
if ((err = uv__cloexec(temp[0], 1)))
|
|
653
|
+
goto fail;
|
|
654
|
+
if ((err = uv__cloexec(temp[1], 1)))
|
|
655
|
+
goto fail;
|
|
656
|
+
#endif
|
|
657
|
+
|
|
658
|
+
if (flags0 & UV_NONBLOCK_PIPE)
|
|
659
|
+
if ((err = uv__nonblock(temp[0], 1)))
|
|
660
|
+
goto fail;
|
|
661
|
+
if (flags1 & UV_NONBLOCK_PIPE)
|
|
662
|
+
if ((err = uv__nonblock(temp[1], 1)))
|
|
663
|
+
goto fail;
|
|
664
|
+
|
|
665
|
+
fds[0] = temp[0];
|
|
666
|
+
fds[1] = temp[1];
|
|
667
|
+
return 0;
|
|
668
|
+
|
|
669
|
+
fail:
|
|
670
|
+
uv__close(temp[0]);
|
|
671
|
+
uv__close(temp[1]);
|
|
672
|
+
return err;
|
|
673
|
+
}
|