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
|
@@ -23,35 +23,28 @@
|
|
|
23
23
|
|
|
24
24
|
#if !defined(_WIN32)
|
|
25
25
|
# include "unix/internal.h"
|
|
26
|
-
#else
|
|
27
|
-
# include "win/req-inl.h"
|
|
28
|
-
/* TODO(saghul): unify internal req functions */
|
|
29
|
-
static void uv__req_init(uv_loop_t* loop,
|
|
30
|
-
uv_req_t* req,
|
|
31
|
-
uv_req_type type) {
|
|
32
|
-
uv_req_init(loop, req);
|
|
33
|
-
req->type = type;
|
|
34
|
-
uv__req_register(loop, req);
|
|
35
|
-
}
|
|
36
|
-
# define uv__req_init(loop, req, type) \
|
|
37
|
-
uv__req_init((loop), (uv_req_t*)(req), (type))
|
|
38
26
|
#endif
|
|
39
27
|
|
|
40
28
|
#include <stdlib.h>
|
|
41
29
|
|
|
42
|
-
#define MAX_THREADPOOL_SIZE
|
|
30
|
+
#define MAX_THREADPOOL_SIZE 1024
|
|
43
31
|
|
|
44
32
|
static uv_once_t once = UV_ONCE_INIT;
|
|
45
33
|
static uv_cond_t cond;
|
|
46
34
|
static uv_mutex_t mutex;
|
|
47
35
|
static unsigned int idle_threads;
|
|
36
|
+
static unsigned int slow_io_work_running;
|
|
48
37
|
static unsigned int nthreads;
|
|
49
38
|
static uv_thread_t* threads;
|
|
50
39
|
static uv_thread_t default_threads[4];
|
|
51
|
-
static
|
|
52
|
-
static
|
|
53
|
-
static
|
|
40
|
+
static struct uv__queue exit_message;
|
|
41
|
+
static struct uv__queue wq;
|
|
42
|
+
static struct uv__queue run_slow_work_message;
|
|
43
|
+
static struct uv__queue slow_io_pending_wq;
|
|
54
44
|
|
|
45
|
+
static unsigned int slow_work_thread_threshold(void) {
|
|
46
|
+
return (nthreads + 1) / 2;
|
|
47
|
+
}
|
|
55
48
|
|
|
56
49
|
static void uv__cancelled(struct uv__work* w) {
|
|
57
50
|
abort();
|
|
@@ -63,64 +56,124 @@ static void uv__cancelled(struct uv__work* w) {
|
|
|
63
56
|
*/
|
|
64
57
|
static void worker(void* arg) {
|
|
65
58
|
struct uv__work* w;
|
|
66
|
-
|
|
59
|
+
struct uv__queue* q;
|
|
60
|
+
int is_slow_work;
|
|
67
61
|
|
|
68
|
-
(
|
|
62
|
+
uv_sem_post((uv_sem_t*) arg);
|
|
63
|
+
arg = NULL;
|
|
69
64
|
|
|
65
|
+
uv_mutex_lock(&mutex);
|
|
70
66
|
for (;;) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
while
|
|
67
|
+
/* `mutex` should always be locked at this point. */
|
|
68
|
+
|
|
69
|
+
/* Keep waiting while either no work is present or only slow I/O
|
|
70
|
+
and we're at the threshold for that. */
|
|
71
|
+
while (uv__queue_empty(&wq) ||
|
|
72
|
+
(uv__queue_head(&wq) == &run_slow_work_message &&
|
|
73
|
+
uv__queue_next(&run_slow_work_message) == &wq &&
|
|
74
|
+
slow_io_work_running >= slow_work_thread_threshold())) {
|
|
74
75
|
idle_threads += 1;
|
|
75
76
|
uv_cond_wait(&cond, &mutex);
|
|
76
77
|
idle_threads -= 1;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
q =
|
|
80
|
-
|
|
81
|
-
if (q == &exit_message)
|
|
80
|
+
q = uv__queue_head(&wq);
|
|
81
|
+
if (q == &exit_message) {
|
|
82
82
|
uv_cond_signal(&cond);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
QUEUE_INIT(q); /* Signal uv_cancel() that the work req is
|
|
86
|
-
executing. */
|
|
83
|
+
uv_mutex_unlock(&mutex);
|
|
84
|
+
break;
|
|
87
85
|
}
|
|
88
86
|
|
|
89
|
-
|
|
87
|
+
uv__queue_remove(q);
|
|
88
|
+
uv__queue_init(q); /* Signal uv_cancel() that the work req is executing. */
|
|
89
|
+
|
|
90
|
+
is_slow_work = 0;
|
|
91
|
+
if (q == &run_slow_work_message) {
|
|
92
|
+
/* If we're at the slow I/O threshold, re-schedule until after all
|
|
93
|
+
other work in the queue is done. */
|
|
94
|
+
if (slow_io_work_running >= slow_work_thread_threshold()) {
|
|
95
|
+
uv__queue_insert_tail(&wq, q);
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* If we encountered a request to run slow I/O work but there is none
|
|
100
|
+
to run, that means it's cancelled => Start over. */
|
|
101
|
+
if (uv__queue_empty(&slow_io_pending_wq))
|
|
102
|
+
continue;
|
|
103
|
+
|
|
104
|
+
is_slow_work = 1;
|
|
105
|
+
slow_io_work_running++;
|
|
106
|
+
|
|
107
|
+
q = uv__queue_head(&slow_io_pending_wq);
|
|
108
|
+
uv__queue_remove(q);
|
|
109
|
+
uv__queue_init(q);
|
|
110
|
+
|
|
111
|
+
/* If there is more slow I/O work, schedule it to be run as well. */
|
|
112
|
+
if (!uv__queue_empty(&slow_io_pending_wq)) {
|
|
113
|
+
uv__queue_insert_tail(&wq, &run_slow_work_message);
|
|
114
|
+
if (idle_threads > 0)
|
|
115
|
+
uv_cond_signal(&cond);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
90
118
|
|
|
91
|
-
|
|
92
|
-
break;
|
|
119
|
+
uv_mutex_unlock(&mutex);
|
|
93
120
|
|
|
94
|
-
w =
|
|
121
|
+
w = uv__queue_data(q, struct uv__work, wq);
|
|
95
122
|
w->work(w);
|
|
96
123
|
|
|
97
124
|
uv_mutex_lock(&w->loop->wq_mutex);
|
|
98
125
|
w->work = NULL; /* Signal uv_cancel() that the work req is done
|
|
99
126
|
executing. */
|
|
100
|
-
|
|
127
|
+
uv__queue_insert_tail(&w->loop->wq, &w->wq);
|
|
101
128
|
uv_async_send(&w->loop->wq_async);
|
|
102
129
|
uv_mutex_unlock(&w->loop->wq_mutex);
|
|
130
|
+
|
|
131
|
+
/* Lock `mutex` since that is expected at the start of the next
|
|
132
|
+
* iteration. */
|
|
133
|
+
uv_mutex_lock(&mutex);
|
|
134
|
+
if (is_slow_work) {
|
|
135
|
+
/* `slow_io_work_running` is protected by `mutex`. */
|
|
136
|
+
slow_io_work_running--;
|
|
137
|
+
}
|
|
103
138
|
}
|
|
104
139
|
}
|
|
105
140
|
|
|
106
141
|
|
|
107
|
-
static void post(
|
|
142
|
+
static void post(struct uv__queue* q, enum uv__work_kind kind) {
|
|
108
143
|
uv_mutex_lock(&mutex);
|
|
109
|
-
|
|
144
|
+
if (kind == UV__WORK_SLOW_IO) {
|
|
145
|
+
/* Insert into a separate queue. */
|
|
146
|
+
uv__queue_insert_tail(&slow_io_pending_wq, q);
|
|
147
|
+
if (!uv__queue_empty(&run_slow_work_message)) {
|
|
148
|
+
/* Running slow I/O tasks is already scheduled => Nothing to do here.
|
|
149
|
+
The worker that runs said other task will schedule this one as well. */
|
|
150
|
+
uv_mutex_unlock(&mutex);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
q = &run_slow_work_message;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
uv__queue_insert_tail(&wq, q);
|
|
110
157
|
if (idle_threads > 0)
|
|
111
158
|
uv_cond_signal(&cond);
|
|
112
159
|
uv_mutex_unlock(&mutex);
|
|
113
160
|
}
|
|
114
161
|
|
|
115
162
|
|
|
116
|
-
#
|
|
117
|
-
|
|
163
|
+
#ifdef __MVS__
|
|
164
|
+
/* TODO(itodorov) - zos: revisit when Woz compiler is available. */
|
|
165
|
+
__attribute__((destructor))
|
|
166
|
+
#endif
|
|
167
|
+
void uv__threadpool_cleanup(void) {
|
|
118
168
|
unsigned int i;
|
|
119
169
|
|
|
120
|
-
if (
|
|
170
|
+
if (nthreads == 0)
|
|
121
171
|
return;
|
|
122
172
|
|
|
123
|
-
|
|
173
|
+
#ifndef __MVS__
|
|
174
|
+
/* TODO(gabylb) - zos: revisit when Woz compiler is available. */
|
|
175
|
+
post(&exit_message, UV__WORK_CPU);
|
|
176
|
+
#endif
|
|
124
177
|
|
|
125
178
|
for (i = 0; i < nthreads; i++)
|
|
126
179
|
if (uv_thread_join(threads + i))
|
|
@@ -134,14 +187,14 @@ UV_DESTRUCTOR(static void cleanup(void)) {
|
|
|
134
187
|
|
|
135
188
|
threads = NULL;
|
|
136
189
|
nthreads = 0;
|
|
137
|
-
initialized = 0;
|
|
138
190
|
}
|
|
139
|
-
#endif
|
|
140
191
|
|
|
141
192
|
|
|
142
|
-
static void
|
|
193
|
+
static void init_threads(void) {
|
|
194
|
+
uv_thread_options_t config;
|
|
143
195
|
unsigned int i;
|
|
144
196
|
const char* val;
|
|
197
|
+
uv_sem_t sem;
|
|
145
198
|
|
|
146
199
|
nthreads = ARRAY_SIZE(default_threads);
|
|
147
200
|
val = getenv("UV_THREADPOOL_SIZE");
|
|
@@ -167,37 +220,74 @@ static void init_once(void) {
|
|
|
167
220
|
if (uv_mutex_init(&mutex))
|
|
168
221
|
abort();
|
|
169
222
|
|
|
170
|
-
|
|
223
|
+
uv__queue_init(&wq);
|
|
224
|
+
uv__queue_init(&slow_io_pending_wq);
|
|
225
|
+
uv__queue_init(&run_slow_work_message);
|
|
226
|
+
|
|
227
|
+
if (uv_sem_init(&sem, 0))
|
|
228
|
+
abort();
|
|
229
|
+
|
|
230
|
+
config.flags = UV_THREAD_HAS_STACK_SIZE;
|
|
231
|
+
config.stack_size = 8u << 20; /* 8 MB */
|
|
171
232
|
|
|
172
233
|
for (i = 0; i < nthreads; i++)
|
|
173
|
-
if (
|
|
234
|
+
if (uv_thread_create_ex(threads + i, &config, worker, &sem))
|
|
174
235
|
abort();
|
|
175
236
|
|
|
176
|
-
|
|
237
|
+
for (i = 0; i < nthreads; i++)
|
|
238
|
+
uv_sem_wait(&sem);
|
|
239
|
+
|
|
240
|
+
uv_sem_destroy(&sem);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
#ifndef _WIN32
|
|
245
|
+
static void reset_once(void) {
|
|
246
|
+
uv_once_t child_once = UV_ONCE_INIT;
|
|
247
|
+
memcpy(&once, &child_once, sizeof(child_once));
|
|
248
|
+
}
|
|
249
|
+
#endif
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
static void init_once(void) {
|
|
253
|
+
#ifndef _WIN32
|
|
254
|
+
/* Re-initialize the threadpool after fork.
|
|
255
|
+
* Note that this discards the global mutex and condition as well
|
|
256
|
+
* as the work queue.
|
|
257
|
+
*/
|
|
258
|
+
if (pthread_atfork(NULL, NULL, &reset_once))
|
|
259
|
+
abort();
|
|
260
|
+
#endif
|
|
261
|
+
init_threads();
|
|
177
262
|
}
|
|
178
263
|
|
|
179
264
|
|
|
180
265
|
void uv__work_submit(uv_loop_t* loop,
|
|
181
266
|
struct uv__work* w,
|
|
267
|
+
enum uv__work_kind kind,
|
|
182
268
|
void (*work)(struct uv__work* w),
|
|
183
269
|
void (*done)(struct uv__work* w, int status)) {
|
|
184
270
|
uv_once(&once, init_once);
|
|
185
271
|
w->loop = loop;
|
|
186
272
|
w->work = work;
|
|
187
273
|
w->done = done;
|
|
188
|
-
post(&w->wq);
|
|
274
|
+
post(&w->wq, kind);
|
|
189
275
|
}
|
|
190
276
|
|
|
191
277
|
|
|
278
|
+
/* TODO(bnoordhuis) teach libuv how to cancel file operations
|
|
279
|
+
* that go through io_uring instead of the thread pool.
|
|
280
|
+
*/
|
|
192
281
|
static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) {
|
|
193
282
|
int cancelled;
|
|
194
283
|
|
|
284
|
+
uv_once(&once, init_once); /* Ensure |mutex| is initialized. */
|
|
195
285
|
uv_mutex_lock(&mutex);
|
|
196
286
|
uv_mutex_lock(&w->loop->wq_mutex);
|
|
197
287
|
|
|
198
|
-
cancelled = !
|
|
288
|
+
cancelled = !uv__queue_empty(&w->wq) && w->work != NULL;
|
|
199
289
|
if (cancelled)
|
|
200
|
-
|
|
290
|
+
uv__queue_remove(&w->wq);
|
|
201
291
|
|
|
202
292
|
uv_mutex_unlock(&w->loop->wq_mutex);
|
|
203
293
|
uv_mutex_unlock(&mutex);
|
|
@@ -207,7 +297,7 @@ static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) {
|
|
|
207
297
|
|
|
208
298
|
w->work = uv__cancelled;
|
|
209
299
|
uv_mutex_lock(&loop->wq_mutex);
|
|
210
|
-
|
|
300
|
+
uv__queue_insert_tail(&loop->wq, &w->wq);
|
|
211
301
|
uv_async_send(&loop->wq_async);
|
|
212
302
|
uv_mutex_unlock(&loop->wq_mutex);
|
|
213
303
|
|
|
@@ -218,22 +308,39 @@ static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) {
|
|
|
218
308
|
void uv__work_done(uv_async_t* handle) {
|
|
219
309
|
struct uv__work* w;
|
|
220
310
|
uv_loop_t* loop;
|
|
221
|
-
|
|
222
|
-
|
|
311
|
+
struct uv__queue* q;
|
|
312
|
+
struct uv__queue wq;
|
|
223
313
|
int err;
|
|
314
|
+
int nevents;
|
|
224
315
|
|
|
225
316
|
loop = container_of(handle, uv_loop_t, wq_async);
|
|
226
317
|
uv_mutex_lock(&loop->wq_mutex);
|
|
227
|
-
|
|
318
|
+
uv__queue_move(&loop->wq, &wq);
|
|
228
319
|
uv_mutex_unlock(&loop->wq_mutex);
|
|
229
320
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
321
|
+
nevents = 0;
|
|
322
|
+
|
|
323
|
+
while (!uv__queue_empty(&wq)) {
|
|
324
|
+
q = uv__queue_head(&wq);
|
|
325
|
+
uv__queue_remove(q);
|
|
233
326
|
|
|
234
327
|
w = container_of(q, struct uv__work, wq);
|
|
235
328
|
err = (w->work == uv__cancelled) ? UV_ECANCELED : 0;
|
|
236
329
|
w->done(w, err);
|
|
330
|
+
nevents++;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* This check accomplishes 2 things:
|
|
334
|
+
* 1. Even if the queue was empty, the call to uv__work_done() should count
|
|
335
|
+
* as an event. Which will have been added by the event loop when
|
|
336
|
+
* calling this callback.
|
|
337
|
+
* 2. Prevents accidental wrap around in case nevents == 0 events == 0.
|
|
338
|
+
*/
|
|
339
|
+
if (nevents > 1) {
|
|
340
|
+
/* Subtract 1 to counter the call to uv__work_done(). */
|
|
341
|
+
uv__metrics_inc_events(loop, nevents - 1);
|
|
342
|
+
if (uv__get_internal_fields(loop)->current_timeout == 0)
|
|
343
|
+
uv__metrics_inc_events_waiting(loop, nevents - 1);
|
|
237
344
|
}
|
|
238
345
|
}
|
|
239
346
|
|
|
@@ -249,7 +356,7 @@ static void uv__queue_done(struct uv__work* w, int err) {
|
|
|
249
356
|
uv_work_t* req;
|
|
250
357
|
|
|
251
358
|
req = container_of(w, uv_work_t, work_req);
|
|
252
|
-
uv__req_unregister(req->loop
|
|
359
|
+
uv__req_unregister(req->loop);
|
|
253
360
|
|
|
254
361
|
if (req->after_work_cb == NULL)
|
|
255
362
|
return;
|
|
@@ -269,7 +376,11 @@ int uv_queue_work(uv_loop_t* loop,
|
|
|
269
376
|
req->loop = loop;
|
|
270
377
|
req->work_cb = work_cb;
|
|
271
378
|
req->after_work_cb = after_work_cb;
|
|
272
|
-
uv__work_submit(loop,
|
|
379
|
+
uv__work_submit(loop,
|
|
380
|
+
&req->work_req,
|
|
381
|
+
UV__WORK_CPU,
|
|
382
|
+
uv__queue_work,
|
|
383
|
+
uv__queue_done);
|
|
273
384
|
return 0;
|
|
274
385
|
}
|
|
275
386
|
|
|
@@ -291,6 +402,10 @@ int uv_cancel(uv_req_t* req) {
|
|
|
291
402
|
loop = ((uv_getnameinfo_t*) req)->loop;
|
|
292
403
|
wreq = &((uv_getnameinfo_t*) req)->work_req;
|
|
293
404
|
break;
|
|
405
|
+
case UV_RANDOM:
|
|
406
|
+
loop = ((uv_random_t*) req)->loop;
|
|
407
|
+
wreq = &((uv_random_t*) req)->work_req;
|
|
408
|
+
break;
|
|
294
409
|
case UV_WORK:
|
|
295
410
|
loop = ((uv_work_t*) req)->loop;
|
|
296
411
|
wreq = &((uv_work_t*) req)->work_req;
|
|
@@ -19,20 +19,29 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
#include "uv.h"
|
|
22
|
-
#include "
|
|
22
|
+
#include "uv-common.h"
|
|
23
23
|
#include "heap-inl.h"
|
|
24
24
|
|
|
25
25
|
#include <assert.h>
|
|
26
26
|
#include <limits.h>
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
static struct heap *timer_heap(const uv_loop_t* loop) {
|
|
30
|
+
#ifdef _WIN32
|
|
31
|
+
return (struct heap*) loop->timer_heap;
|
|
32
|
+
#else
|
|
33
|
+
return (struct heap*) &loop->timer_heap;
|
|
34
|
+
#endif
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
29
38
|
static int timer_less_than(const struct heap_node* ha,
|
|
30
39
|
const struct heap_node* hb) {
|
|
31
40
|
const uv_timer_t* a;
|
|
32
41
|
const uv_timer_t* b;
|
|
33
42
|
|
|
34
|
-
a = container_of(ha,
|
|
35
|
-
b = container_of(hb,
|
|
43
|
+
a = container_of(ha, uv_timer_t, node.heap);
|
|
44
|
+
b = container_of(hb, uv_timer_t, node.heap);
|
|
36
45
|
|
|
37
46
|
if (a->timeout < b->timeout)
|
|
38
47
|
return 1;
|
|
@@ -42,19 +51,16 @@ static int timer_less_than(const struct heap_node* ha,
|
|
|
42
51
|
/* Compare start_id when both have the same timeout. start_id is
|
|
43
52
|
* allocated with loop->timer_counter in uv_timer_start().
|
|
44
53
|
*/
|
|
45
|
-
|
|
46
|
-
return 1;
|
|
47
|
-
if (b->start_id < a->start_id)
|
|
48
|
-
return 0;
|
|
49
|
-
|
|
50
|
-
return 0;
|
|
54
|
+
return a->start_id < b->start_id;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
|
|
54
58
|
int uv_timer_init(uv_loop_t* loop, uv_timer_t* handle) {
|
|
55
59
|
uv__handle_init(loop, (uv_handle_t*)handle, UV_TIMER);
|
|
56
60
|
handle->timer_cb = NULL;
|
|
61
|
+
handle->timeout = 0;
|
|
57
62
|
handle->repeat = 0;
|
|
63
|
+
uv__queue_init(&handle->node.queue);
|
|
58
64
|
return 0;
|
|
59
65
|
}
|
|
60
66
|
|
|
@@ -65,11 +71,10 @@ int uv_timer_start(uv_timer_t* handle,
|
|
|
65
71
|
uint64_t repeat) {
|
|
66
72
|
uint64_t clamped_timeout;
|
|
67
73
|
|
|
68
|
-
if (cb == NULL)
|
|
69
|
-
return
|
|
74
|
+
if (uv__is_closing(handle) || cb == NULL)
|
|
75
|
+
return UV_EINVAL;
|
|
70
76
|
|
|
71
|
-
|
|
72
|
-
uv_timer_stop(handle);
|
|
77
|
+
uv_timer_stop(handle);
|
|
73
78
|
|
|
74
79
|
clamped_timeout = handle->loop->time + timeout;
|
|
75
80
|
if (clamped_timeout < timeout)
|
|
@@ -78,11 +83,11 @@ int uv_timer_start(uv_timer_t* handle,
|
|
|
78
83
|
handle->timer_cb = cb;
|
|
79
84
|
handle->timeout = clamped_timeout;
|
|
80
85
|
handle->repeat = repeat;
|
|
81
|
-
/* start_id is the second index to be compared in
|
|
86
|
+
/* start_id is the second index to be compared in timer_less_than() */
|
|
82
87
|
handle->start_id = handle->loop->timer_counter++;
|
|
83
88
|
|
|
84
|
-
heap_insert((
|
|
85
|
-
(struct heap_node*) &handle->
|
|
89
|
+
heap_insert(timer_heap(handle->loop),
|
|
90
|
+
(struct heap_node*) &handle->node.heap,
|
|
86
91
|
timer_less_than);
|
|
87
92
|
uv__handle_start(handle);
|
|
88
93
|
|
|
@@ -91,21 +96,23 @@ int uv_timer_start(uv_timer_t* handle,
|
|
|
91
96
|
|
|
92
97
|
|
|
93
98
|
int uv_timer_stop(uv_timer_t* handle) {
|
|
94
|
-
if (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
if (uv__is_active(handle)) {
|
|
100
|
+
heap_remove(timer_heap(handle->loop),
|
|
101
|
+
(struct heap_node*) &handle->node.heap,
|
|
102
|
+
timer_less_than);
|
|
103
|
+
uv__handle_stop(handle);
|
|
104
|
+
} else {
|
|
105
|
+
uv__queue_remove(&handle->node.queue);
|
|
106
|
+
}
|
|
101
107
|
|
|
108
|
+
uv__queue_init(&handle->node.queue);
|
|
102
109
|
return 0;
|
|
103
110
|
}
|
|
104
111
|
|
|
105
112
|
|
|
106
113
|
int uv_timer_again(uv_timer_t* handle) {
|
|
107
114
|
if (handle->timer_cb == NULL)
|
|
108
|
-
return
|
|
115
|
+
return UV_EINVAL;
|
|
109
116
|
|
|
110
117
|
if (handle->repeat) {
|
|
111
118
|
uv_timer_stop(handle);
|
|
@@ -126,16 +133,24 @@ uint64_t uv_timer_get_repeat(const uv_timer_t* handle) {
|
|
|
126
133
|
}
|
|
127
134
|
|
|
128
135
|
|
|
136
|
+
uint64_t uv_timer_get_due_in(const uv_timer_t* handle) {
|
|
137
|
+
if (handle->loop->time >= handle->timeout)
|
|
138
|
+
return 0;
|
|
139
|
+
|
|
140
|
+
return handle->timeout - handle->loop->time;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
129
144
|
int uv__next_timeout(const uv_loop_t* loop) {
|
|
130
145
|
const struct heap_node* heap_node;
|
|
131
146
|
const uv_timer_t* handle;
|
|
132
147
|
uint64_t diff;
|
|
133
148
|
|
|
134
|
-
heap_node = heap_min((
|
|
149
|
+
heap_node = heap_min(timer_heap(loop));
|
|
135
150
|
if (heap_node == NULL)
|
|
136
151
|
return -1; /* block indefinitely */
|
|
137
152
|
|
|
138
|
-
handle = container_of(heap_node,
|
|
153
|
+
handle = container_of(heap_node, uv_timer_t, node.heap);
|
|
139
154
|
if (handle->timeout <= loop->time)
|
|
140
155
|
return 0;
|
|
141
156
|
|
|
@@ -143,24 +158,37 @@ int uv__next_timeout(const uv_loop_t* loop) {
|
|
|
143
158
|
if (diff > INT_MAX)
|
|
144
159
|
diff = INT_MAX;
|
|
145
160
|
|
|
146
|
-
return diff;
|
|
161
|
+
return (int) diff;
|
|
147
162
|
}
|
|
148
163
|
|
|
149
164
|
|
|
150
165
|
void uv__run_timers(uv_loop_t* loop) {
|
|
151
166
|
struct heap_node* heap_node;
|
|
152
167
|
uv_timer_t* handle;
|
|
168
|
+
struct uv__queue* queue_node;
|
|
169
|
+
struct uv__queue ready_queue;
|
|
170
|
+
|
|
171
|
+
uv__queue_init(&ready_queue);
|
|
153
172
|
|
|
154
173
|
for (;;) {
|
|
155
|
-
heap_node = heap_min((
|
|
174
|
+
heap_node = heap_min(timer_heap(loop));
|
|
156
175
|
if (heap_node == NULL)
|
|
157
176
|
break;
|
|
158
177
|
|
|
159
|
-
handle = container_of(heap_node, uv_timer_t,
|
|
178
|
+
handle = container_of(heap_node, uv_timer_t, node.heap);
|
|
160
179
|
if (handle->timeout > loop->time)
|
|
161
180
|
break;
|
|
162
181
|
|
|
163
182
|
uv_timer_stop(handle);
|
|
183
|
+
uv__queue_insert_tail(&ready_queue, &handle->node.queue);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
while (!uv__queue_empty(&ready_queue)) {
|
|
187
|
+
queue_node = uv__queue_head(&ready_queue);
|
|
188
|
+
uv__queue_remove(queue_node);
|
|
189
|
+
uv__queue_init(queue_node);
|
|
190
|
+
handle = container_of(queue_node, uv_timer_t, node.queue);
|
|
191
|
+
|
|
164
192
|
uv_timer_again(handle);
|
|
165
193
|
handle->timer_cb(handle);
|
|
166
194
|
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* Copyright libuv project contributors. All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
* of this software and associated documentation files (the "Software"), to
|
|
5
|
+
* deal in the Software without restriction, including without limitation the
|
|
6
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
7
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
* furnished to do so, subject to the following conditions:
|
|
9
|
+
*
|
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
|
11
|
+
* all copies or substantial portions of the Software.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
18
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
19
|
+
* IN THE SOFTWARE.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
#include "uv.h"
|
|
23
|
+
#include "internal.h"
|
|
24
|
+
|
|
25
|
+
#include <stdint.h>
|
|
26
|
+
#include <stdlib.h>
|
|
27
|
+
#include <string.h>
|
|
28
|
+
|
|
29
|
+
#include <sys/types.h>
|
|
30
|
+
|
|
31
|
+
#include <sys/time.h>
|
|
32
|
+
#include <unistd.h>
|
|
33
|
+
|
|
34
|
+
#include <procinfo.h>
|
|
35
|
+
|
|
36
|
+
#include <ctype.h>
|
|
37
|
+
|
|
38
|
+
extern char* original_exepath;
|
|
39
|
+
extern uv_mutex_t process_title_mutex;
|
|
40
|
+
extern uv_once_t process_title_mutex_once;
|
|
41
|
+
extern void init_process_title_mutex_once(void);
|
|
42
|
+
|
|
43
|
+
uint64_t uv__hrtime(uv_clocktype_t type) {
|
|
44
|
+
uint64_t G = 1000000000;
|
|
45
|
+
timebasestruct_t t;
|
|
46
|
+
read_wall_time(&t, TIMEBASE_SZ);
|
|
47
|
+
time_base_to_time(&t, TIMEBASE_SZ);
|
|
48
|
+
return (uint64_t) t.tb_high * G + t.tb_low;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* We could use a static buffer for the path manipulations that we need outside
|
|
54
|
+
* of the function, but this function could be called by multiple consumers and
|
|
55
|
+
* we don't want to potentially create a race condition in the use of snprintf.
|
|
56
|
+
* There is no direct way of getting the exe path in AIX - either through /procfs
|
|
57
|
+
* or through some libc APIs. The below approach is to parse the argv[0]'s pattern
|
|
58
|
+
* and use it in conjunction with PATH environment variable to craft one.
|
|
59
|
+
*/
|
|
60
|
+
int uv_exepath(char* buffer, size_t* size) {
|
|
61
|
+
int res;
|
|
62
|
+
char args[UV__PATH_MAX];
|
|
63
|
+
size_t cached_len;
|
|
64
|
+
struct procsinfo pi;
|
|
65
|
+
|
|
66
|
+
if (buffer == NULL || size == NULL || *size == 0)
|
|
67
|
+
return UV_EINVAL;
|
|
68
|
+
|
|
69
|
+
uv_once(&process_title_mutex_once, init_process_title_mutex_once);
|
|
70
|
+
uv_mutex_lock(&process_title_mutex);
|
|
71
|
+
if (original_exepath != NULL) {
|
|
72
|
+
cached_len = strlen(original_exepath);
|
|
73
|
+
*size -= 1;
|
|
74
|
+
if (*size > cached_len)
|
|
75
|
+
*size = cached_len;
|
|
76
|
+
memcpy(buffer, original_exepath, *size);
|
|
77
|
+
buffer[*size] = '\0';
|
|
78
|
+
uv_mutex_unlock(&process_title_mutex);
|
|
79
|
+
return 0;
|
|
80
|
+
}
|
|
81
|
+
uv_mutex_unlock(&process_title_mutex);
|
|
82
|
+
pi.pi_pid = getpid();
|
|
83
|
+
res = getargs(&pi, sizeof(pi), args, sizeof(args));
|
|
84
|
+
|
|
85
|
+
if (res < 0)
|
|
86
|
+
return UV_EINVAL;
|
|
87
|
+
|
|
88
|
+
return uv__search_path(args, buffer, size);
|
|
89
|
+
}
|