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
|
@@ -24,33 +24,38 @@
|
|
|
24
24
|
|
|
25
25
|
#include "uv.h"
|
|
26
26
|
#include "internal.h"
|
|
27
|
-
#include "atomic-ops.h"
|
|
28
27
|
|
|
29
28
|
#include <errno.h>
|
|
29
|
+
#include <stdatomic.h>
|
|
30
30
|
#include <stdio.h> /* snprintf() */
|
|
31
31
|
#include <assert.h>
|
|
32
32
|
#include <stdlib.h>
|
|
33
33
|
#include <string.h>
|
|
34
34
|
#include <unistd.h>
|
|
35
|
+
#include <sched.h> /* sched_yield() */
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
#ifdef __linux__
|
|
38
|
+
#include <sys/eventfd.h>
|
|
39
|
+
#endif
|
|
40
|
+
|
|
41
|
+
static void uv__async_send(uv_loop_t* loop);
|
|
42
|
+
static int uv__async_start(uv_loop_t* loop);
|
|
43
|
+
static void uv__cpu_relax(void);
|
|
40
44
|
|
|
41
45
|
|
|
42
46
|
int uv_async_init(uv_loop_t* loop, uv_async_t* handle, uv_async_cb async_cb) {
|
|
43
47
|
int err;
|
|
44
48
|
|
|
45
|
-
err = uv__async_start(loop
|
|
49
|
+
err = uv__async_start(loop);
|
|
46
50
|
if (err)
|
|
47
51
|
return err;
|
|
48
52
|
|
|
49
53
|
uv__handle_init(loop, (uv_handle_t*)handle, UV_ASYNC);
|
|
50
54
|
handle->async_cb = async_cb;
|
|
51
55
|
handle->pending = 0;
|
|
56
|
+
handle->u.fd = 0; /* This will be used as a busy flag. */
|
|
52
57
|
|
|
53
|
-
|
|
58
|
+
uv__queue_insert_tail(&loop->async_handles, &handle->queue);
|
|
54
59
|
uv__handle_start(handle);
|
|
55
60
|
|
|
56
61
|
return 0;
|
|
@@ -58,61 +63,85 @@ int uv_async_init(uv_loop_t* loop, uv_async_t* handle, uv_async_cb async_cb) {
|
|
|
58
63
|
|
|
59
64
|
|
|
60
65
|
int uv_async_send(uv_async_t* handle) {
|
|
66
|
+
_Atomic int* pending;
|
|
67
|
+
_Atomic int* busy;
|
|
68
|
+
|
|
69
|
+
pending = (_Atomic int*) &handle->pending;
|
|
70
|
+
busy = (_Atomic int*) &handle->u.fd;
|
|
71
|
+
|
|
61
72
|
/* Do a cheap read first. */
|
|
62
|
-
if (
|
|
73
|
+
if (atomic_load_explicit(pending, memory_order_relaxed) != 0)
|
|
63
74
|
return 0;
|
|
64
75
|
|
|
65
|
-
|
|
66
|
-
|
|
76
|
+
/* Set the loop to busy. */
|
|
77
|
+
atomic_fetch_add(busy, 1);
|
|
67
78
|
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
/* Wake up the other thread's event loop. */
|
|
80
|
+
if (atomic_exchange(pending, 1) == 0)
|
|
81
|
+
uv__async_send(handle->loop);
|
|
70
82
|
|
|
83
|
+
/* Set the loop to not-busy. */
|
|
84
|
+
atomic_fetch_add(busy, -1);
|
|
71
85
|
|
|
72
|
-
|
|
73
|
-
QUEUE_REMOVE(&handle->queue);
|
|
74
|
-
uv__handle_stop(handle);
|
|
86
|
+
return 0;
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
90
|
+
/* Wait for the busy flag to clear before closing.
|
|
91
|
+
* Only call this from the event loop thread. */
|
|
92
|
+
static void uv__async_spin(uv_async_t* handle) {
|
|
93
|
+
_Atomic int* pending;
|
|
94
|
+
_Atomic int* busy;
|
|
95
|
+
int i;
|
|
84
96
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
q = QUEUE_HEAD(&queue);
|
|
88
|
-
h = QUEUE_DATA(q, uv_async_t, queue);
|
|
97
|
+
pending = (_Atomic int*) &handle->pending;
|
|
98
|
+
busy = (_Atomic int*) &handle->u.fd;
|
|
89
99
|
|
|
90
|
-
|
|
91
|
-
|
|
100
|
+
/* Set the pending flag first, so no new events will be added by other
|
|
101
|
+
* threads after this function returns. */
|
|
102
|
+
atomic_store(pending, 1);
|
|
92
103
|
|
|
93
|
-
|
|
94
|
-
|
|
104
|
+
for (;;) {
|
|
105
|
+
/* 997 is not completely chosen at random. It's a prime number, acyclic by
|
|
106
|
+
* nature, and should therefore hopefully dampen sympathetic resonance.
|
|
107
|
+
*/
|
|
108
|
+
for (i = 0; i < 997; i++) {
|
|
109
|
+
if (atomic_load(busy) == 0)
|
|
110
|
+
return;
|
|
95
111
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
112
|
+
/* Other thread is busy with this handle, spin until it's done. */
|
|
113
|
+
uv__cpu_relax();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Yield the CPU. We may have preempted the other thread while it's
|
|
117
|
+
* inside the critical section and if it's running on the same CPU
|
|
118
|
+
* as us, we'll just burn CPU cycles until the end of our time slice.
|
|
119
|
+
*/
|
|
120
|
+
sched_yield();
|
|
99
121
|
}
|
|
100
122
|
}
|
|
101
123
|
|
|
102
124
|
|
|
125
|
+
void uv__async_close(uv_async_t* handle) {
|
|
126
|
+
uv__async_spin(handle);
|
|
127
|
+
uv__queue_remove(&handle->queue);
|
|
128
|
+
uv__handle_stop(handle);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
103
132
|
static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
|
|
104
|
-
struct uv__async* wa;
|
|
105
133
|
char buf[1024];
|
|
106
|
-
unsigned n;
|
|
107
134
|
ssize_t r;
|
|
135
|
+
struct uv__queue queue;
|
|
136
|
+
struct uv__queue* q;
|
|
137
|
+
uv_async_t* h;
|
|
138
|
+
_Atomic int *pending;
|
|
139
|
+
|
|
140
|
+
assert(w == &loop->async_io_watcher);
|
|
108
141
|
|
|
109
|
-
n = 0;
|
|
110
142
|
for (;;) {
|
|
111
143
|
r = read(w->fd, buf, sizeof(buf));
|
|
112
144
|
|
|
113
|
-
if (r > 0)
|
|
114
|
-
n += r;
|
|
115
|
-
|
|
116
145
|
if (r == sizeof(buf))
|
|
117
146
|
continue;
|
|
118
147
|
|
|
@@ -128,23 +157,28 @@ static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
|
|
|
128
157
|
abort();
|
|
129
158
|
}
|
|
130
159
|
|
|
131
|
-
|
|
160
|
+
uv__queue_move(&loop->async_handles, &queue);
|
|
161
|
+
while (!uv__queue_empty(&queue)) {
|
|
162
|
+
q = uv__queue_head(&queue);
|
|
163
|
+
h = uv__queue_data(q, uv_async_t, queue);
|
|
132
164
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
#endif
|
|
165
|
+
uv__queue_remove(q);
|
|
166
|
+
uv__queue_insert_tail(&loop->async_handles, q);
|
|
167
|
+
|
|
168
|
+
/* Atomically fetch and clear pending flag */
|
|
169
|
+
pending = (_Atomic int*) &h->pending;
|
|
170
|
+
if (atomic_exchange(pending, 0) == 0)
|
|
171
|
+
continue;
|
|
142
172
|
|
|
143
|
-
|
|
173
|
+
if (h->async_cb == NULL)
|
|
174
|
+
continue;
|
|
175
|
+
|
|
176
|
+
h->async_cb(h);
|
|
177
|
+
}
|
|
144
178
|
}
|
|
145
179
|
|
|
146
180
|
|
|
147
|
-
void uv__async_send(
|
|
181
|
+
static void uv__async_send(uv_loop_t* loop) {
|
|
148
182
|
const void* buf;
|
|
149
183
|
ssize_t len;
|
|
150
184
|
int fd;
|
|
@@ -152,14 +186,14 @@ void uv__async_send(struct uv__async* wa) {
|
|
|
152
186
|
|
|
153
187
|
buf = "";
|
|
154
188
|
len = 1;
|
|
155
|
-
fd =
|
|
189
|
+
fd = loop->async_wfd;
|
|
156
190
|
|
|
157
191
|
#if defined(__linux__)
|
|
158
192
|
if (fd == -1) {
|
|
159
193
|
static const uint64_t val = 1;
|
|
160
194
|
buf = &val;
|
|
161
195
|
len = sizeof(val);
|
|
162
|
-
fd =
|
|
196
|
+
fd = loop->async_io_watcher.fd; /* eventfd */
|
|
163
197
|
}
|
|
164
198
|
#endif
|
|
165
199
|
|
|
@@ -178,113 +212,118 @@ void uv__async_send(struct uv__async* wa) {
|
|
|
178
212
|
}
|
|
179
213
|
|
|
180
214
|
|
|
181
|
-
|
|
182
|
-
wa->io_watcher.fd = -1;
|
|
183
|
-
wa->wfd = -1;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
int uv__async_start(uv_loop_t* loop, struct uv__async* wa, uv__async_cb cb) {
|
|
215
|
+
static int uv__async_start(uv_loop_t* loop) {
|
|
188
216
|
int pipefd[2];
|
|
189
217
|
int err;
|
|
190
218
|
|
|
191
|
-
if (
|
|
219
|
+
if (loop->async_io_watcher.fd != -1)
|
|
192
220
|
return 0;
|
|
193
221
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
else if (err == -ENOSYS) {
|
|
200
|
-
err = uv__make_pipe(pipefd, UV__F_NONBLOCK);
|
|
201
|
-
#if defined(__linux__)
|
|
202
|
-
/* Save a file descriptor by opening one of the pipe descriptors as
|
|
203
|
-
* read/write through the procfs. That file descriptor can then
|
|
204
|
-
* function as both ends of the pipe.
|
|
205
|
-
*/
|
|
206
|
-
if (err == 0) {
|
|
207
|
-
char buf[32];
|
|
208
|
-
int fd;
|
|
209
|
-
|
|
210
|
-
snprintf(buf, sizeof(buf), "/proc/self/fd/%d", pipefd[0]);
|
|
211
|
-
fd = uv__open_cloexec(buf, O_RDWR);
|
|
212
|
-
if (fd >= 0) {
|
|
213
|
-
uv__close(pipefd[0]);
|
|
214
|
-
uv__close(pipefd[1]);
|
|
215
|
-
pipefd[0] = fd;
|
|
216
|
-
pipefd[1] = fd;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
#endif
|
|
220
|
-
}
|
|
222
|
+
#ifdef __linux__
|
|
223
|
+
err = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
|
|
224
|
+
if (err < 0)
|
|
225
|
+
return UV__ERR(errno);
|
|
221
226
|
|
|
227
|
+
pipefd[0] = err;
|
|
228
|
+
pipefd[1] = -1;
|
|
229
|
+
#else
|
|
230
|
+
err = uv__make_pipe(pipefd, UV_NONBLOCK_PIPE);
|
|
222
231
|
if (err < 0)
|
|
223
232
|
return err;
|
|
233
|
+
#endif
|
|
224
234
|
|
|
225
|
-
uv__io_init(&
|
|
226
|
-
uv__io_start(loop, &
|
|
227
|
-
|
|
228
|
-
wa->cb = cb;
|
|
235
|
+
uv__io_init(&loop->async_io_watcher, uv__async_io, pipefd[0]);
|
|
236
|
+
uv__io_start(loop, &loop->async_io_watcher, POLLIN);
|
|
237
|
+
loop->async_wfd = pipefd[1];
|
|
229
238
|
|
|
230
239
|
return 0;
|
|
231
240
|
}
|
|
232
241
|
|
|
233
242
|
|
|
234
|
-
void uv__async_stop(uv_loop_t* loop
|
|
235
|
-
|
|
243
|
+
void uv__async_stop(uv_loop_t* loop) {
|
|
244
|
+
struct uv__queue queue;
|
|
245
|
+
struct uv__queue* q;
|
|
246
|
+
uv_async_t* h;
|
|
247
|
+
|
|
248
|
+
if (loop->async_io_watcher.fd == -1)
|
|
236
249
|
return;
|
|
237
250
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
251
|
+
/* Make sure no other thread is accessing the async handle fd after the loop
|
|
252
|
+
* cleanup.
|
|
253
|
+
*/
|
|
254
|
+
uv__queue_move(&loop->async_handles, &queue);
|
|
255
|
+
while (!uv__queue_empty(&queue)) {
|
|
256
|
+
q = uv__queue_head(&queue);
|
|
257
|
+
h = uv__queue_data(q, uv_async_t, queue);
|
|
243
258
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
wa->io_watcher.fd = -1;
|
|
247
|
-
}
|
|
259
|
+
uv__queue_remove(q);
|
|
260
|
+
uv__queue_insert_tail(&loop->async_handles, q);
|
|
248
261
|
|
|
262
|
+
uv__async_spin(h);
|
|
263
|
+
}
|
|
249
264
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
265
|
+
if (loop->async_wfd != -1) {
|
|
266
|
+
if (loop->async_wfd != loop->async_io_watcher.fd)
|
|
267
|
+
uv__close(loop->async_wfd);
|
|
268
|
+
loop->async_wfd = -1;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
uv__io_stop(loop, &loop->async_io_watcher, POLLIN);
|
|
272
|
+
uv__close(loop->async_io_watcher.fd);
|
|
273
|
+
loop->async_io_watcher.fd = -1;
|
|
274
|
+
}
|
|
255
275
|
|
|
256
|
-
if (no_eventfd2)
|
|
257
|
-
goto skip_eventfd2;
|
|
258
276
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
277
|
+
int uv__async_fork(uv_loop_t* loop) {
|
|
278
|
+
struct uv__queue queue;
|
|
279
|
+
struct uv__queue* q;
|
|
280
|
+
uv_async_t* h;
|
|
262
281
|
|
|
263
|
-
if (
|
|
264
|
-
return
|
|
282
|
+
if (loop->async_io_watcher.fd == -1) /* never started */
|
|
283
|
+
return 0;
|
|
265
284
|
|
|
266
|
-
|
|
285
|
+
uv__queue_move(&loop->async_handles, &queue);
|
|
286
|
+
while (!uv__queue_empty(&queue)) {
|
|
287
|
+
q = uv__queue_head(&queue);
|
|
288
|
+
h = uv__queue_data(q, uv_async_t, queue);
|
|
267
289
|
|
|
268
|
-
|
|
290
|
+
uv__queue_remove(q);
|
|
291
|
+
uv__queue_insert_tail(&loop->async_handles, q);
|
|
269
292
|
|
|
270
|
-
|
|
271
|
-
|
|
293
|
+
/* The state of any thread that set pending is now likely corrupt in this
|
|
294
|
+
* child because the user called fork, so just clear these flags and move
|
|
295
|
+
* on. Calling most libc functions after `fork` is declared to be undefined
|
|
296
|
+
* behavior anyways, unless async-signal-safe, for multithreaded programs
|
|
297
|
+
* like libuv, and nothing interesting in pthreads is async-signal-safe.
|
|
298
|
+
*/
|
|
299
|
+
h->pending = 0;
|
|
300
|
+
/* This is the busy flag, and we just abruptly lost all other threads. */
|
|
301
|
+
h->u.fd = 0;
|
|
302
|
+
}
|
|
272
303
|
|
|
273
|
-
|
|
274
|
-
if (
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
304
|
+
/* Recreate these, since they still exist, but belong to the wrong pid now. */
|
|
305
|
+
if (loop->async_wfd != -1) {
|
|
306
|
+
if (loop->async_wfd != loop->async_io_watcher.fd)
|
|
307
|
+
uv__close(loop->async_wfd);
|
|
308
|
+
loop->async_wfd = -1;
|
|
278
309
|
}
|
|
279
310
|
|
|
280
|
-
|
|
281
|
-
|
|
311
|
+
uv__io_stop(loop, &loop->async_io_watcher, POLLIN);
|
|
312
|
+
uv__close(loop->async_io_watcher.fd);
|
|
313
|
+
loop->async_io_watcher.fd = -1;
|
|
282
314
|
|
|
283
|
-
|
|
315
|
+
return uv__async_start(loop);
|
|
316
|
+
}
|
|
284
317
|
|
|
285
|
-
skip_eventfd:
|
|
286
318
|
|
|
319
|
+
static void uv__cpu_relax(void) {
|
|
320
|
+
#if defined(__i386__) || defined(__x86_64__)
|
|
321
|
+
__asm__ __volatile__ ("rep; nop" ::: "memory"); /* a.k.a. PAUSE */
|
|
322
|
+
#elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__)
|
|
323
|
+
__asm__ __volatile__ ("yield" ::: "memory");
|
|
324
|
+
#elif (defined(__ppc__) || defined(__ppc64__)) && defined(__APPLE__)
|
|
325
|
+
__asm volatile ("" : : : "memory");
|
|
326
|
+
#elif !defined(__APPLE__) && (defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__))
|
|
327
|
+
__asm__ __volatile__ ("or 1,1,1; or 2,2,2" ::: "memory");
|
|
287
328
|
#endif
|
|
288
|
-
|
|
289
|
-
return -ENOSYS;
|
|
290
329
|
}
|
|
@@ -0,0 +1,163 @@
|
|
|
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 <errno.h>
|
|
26
|
+
#include <stddef.h>
|
|
27
|
+
|
|
28
|
+
#include <ifaddrs.h>
|
|
29
|
+
#include <net/if.h>
|
|
30
|
+
#if !defined(__CYGWIN__) && !defined(__MSYS__) && !defined(__GNU__)
|
|
31
|
+
#include <net/if_dl.h>
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
#if defined(__HAIKU__)
|
|
35
|
+
#define IFF_RUNNING IFF_LINK
|
|
36
|
+
#endif
|
|
37
|
+
|
|
38
|
+
static int uv__ifaddr_exclude(struct ifaddrs *ent, int exclude_type) {
|
|
39
|
+
if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
|
|
40
|
+
return 1;
|
|
41
|
+
if (ent->ifa_addr == NULL)
|
|
42
|
+
return 1;
|
|
43
|
+
#if !defined(__CYGWIN__) && !defined(__MSYS__) && !defined(__GNU__)
|
|
44
|
+
/*
|
|
45
|
+
* If `exclude_type` is `UV__EXCLUDE_IFPHYS`, return whether `sa_family`
|
|
46
|
+
* equals `AF_LINK`. Otherwise, the result depends on the operating
|
|
47
|
+
* system with `AF_LINK` or `PF_INET`.
|
|
48
|
+
*/
|
|
49
|
+
if (exclude_type == UV__EXCLUDE_IFPHYS)
|
|
50
|
+
return (ent->ifa_addr->sa_family != AF_LINK);
|
|
51
|
+
#endif
|
|
52
|
+
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__) || \
|
|
53
|
+
defined(__HAIKU__)
|
|
54
|
+
/*
|
|
55
|
+
* On BSD getifaddrs returns information related to the raw underlying
|
|
56
|
+
* devices. We're not interested in this information.
|
|
57
|
+
*/
|
|
58
|
+
if (ent->ifa_addr->sa_family == AF_LINK)
|
|
59
|
+
return 1;
|
|
60
|
+
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
|
61
|
+
if (ent->ifa_addr->sa_family != PF_INET &&
|
|
62
|
+
ent->ifa_addr->sa_family != PF_INET6)
|
|
63
|
+
return 1;
|
|
64
|
+
#endif
|
|
65
|
+
return 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
|
|
69
|
+
struct ifaddrs* addrs;
|
|
70
|
+
struct ifaddrs* ent;
|
|
71
|
+
uv_interface_address_t* address;
|
|
72
|
+
#if !(defined(__CYGWIN__) || defined(__MSYS__)) && !defined(__GNU__)
|
|
73
|
+
int i;
|
|
74
|
+
#endif
|
|
75
|
+
|
|
76
|
+
*count = 0;
|
|
77
|
+
*addresses = NULL;
|
|
78
|
+
|
|
79
|
+
if (getifaddrs(&addrs) != 0)
|
|
80
|
+
return UV__ERR(errno);
|
|
81
|
+
|
|
82
|
+
/* Count the number of interfaces */
|
|
83
|
+
for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
|
|
84
|
+
if (uv__ifaddr_exclude(ent, UV__EXCLUDE_IFADDR))
|
|
85
|
+
continue;
|
|
86
|
+
(*count)++;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (*count == 0) {
|
|
90
|
+
freeifaddrs(addrs);
|
|
91
|
+
return 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Make sure the memory is initiallized to zero using calloc() */
|
|
95
|
+
*addresses = uv__calloc(*count, sizeof(**addresses));
|
|
96
|
+
|
|
97
|
+
if (*addresses == NULL) {
|
|
98
|
+
freeifaddrs(addrs);
|
|
99
|
+
return UV_ENOMEM;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
address = *addresses;
|
|
103
|
+
|
|
104
|
+
for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
|
|
105
|
+
if (uv__ifaddr_exclude(ent, UV__EXCLUDE_IFADDR))
|
|
106
|
+
continue;
|
|
107
|
+
|
|
108
|
+
address->name = uv__strdup(ent->ifa_name);
|
|
109
|
+
|
|
110
|
+
if (ent->ifa_addr->sa_family == AF_INET6) {
|
|
111
|
+
address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr);
|
|
112
|
+
} else {
|
|
113
|
+
address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (ent->ifa_netmask == NULL) {
|
|
117
|
+
memset(&address->netmask, 0, sizeof(address->netmask));
|
|
118
|
+
} else if (ent->ifa_netmask->sa_family == AF_INET6) {
|
|
119
|
+
address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask);
|
|
120
|
+
} else {
|
|
121
|
+
address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK);
|
|
125
|
+
|
|
126
|
+
address++;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
#if !(defined(__CYGWIN__) || defined(__MSYS__)) && !defined(__GNU__)
|
|
130
|
+
/* Fill in physical addresses for each interface */
|
|
131
|
+
for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
|
|
132
|
+
if (uv__ifaddr_exclude(ent, UV__EXCLUDE_IFPHYS))
|
|
133
|
+
continue;
|
|
134
|
+
|
|
135
|
+
address = *addresses;
|
|
136
|
+
|
|
137
|
+
for (i = 0; i < *count; i++) {
|
|
138
|
+
if (strcmp(address->name, ent->ifa_name) == 0) {
|
|
139
|
+
struct sockaddr_dl* sa_addr;
|
|
140
|
+
sa_addr = (struct sockaddr_dl*)(ent->ifa_addr);
|
|
141
|
+
memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr));
|
|
142
|
+
}
|
|
143
|
+
address++;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
#endif
|
|
147
|
+
|
|
148
|
+
freeifaddrs(addrs);
|
|
149
|
+
|
|
150
|
+
return 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
void uv_free_interface_addresses(uv_interface_address_t* addresses,
|
|
155
|
+
int count) {
|
|
156
|
+
int i;
|
|
157
|
+
|
|
158
|
+
for (i = 0; i < count; i++) {
|
|
159
|
+
uv__free(addresses[i].name);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
uv__free(addresses);
|
|
163
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 <sys/types.h>
|
|
26
|
+
#include <unistd.h>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
static uv_mutex_t process_title_mutex;
|
|
30
|
+
static uv_once_t process_title_mutex_once = UV_ONCE_INIT;
|
|
31
|
+
static char* process_title;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
static void init_process_title_mutex_once(void) {
|
|
35
|
+
if (uv_mutex_init(&process_title_mutex))
|
|
36
|
+
abort();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
void uv__process_title_cleanup(void) {
|
|
41
|
+
uv_once(&process_title_mutex_once, init_process_title_mutex_once);
|
|
42
|
+
uv_mutex_destroy(&process_title_mutex);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
char** uv_setup_args(int argc, char** argv) {
|
|
47
|
+
process_title = argc > 0 ? uv__strdup(argv[0]) : NULL;
|
|
48
|
+
return argv;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
int uv_set_process_title(const char* title) {
|
|
53
|
+
char* new_title;
|
|
54
|
+
|
|
55
|
+
new_title = uv__strdup(title);
|
|
56
|
+
if (new_title == NULL)
|
|
57
|
+
return UV_ENOMEM;
|
|
58
|
+
|
|
59
|
+
uv_once(&process_title_mutex_once, init_process_title_mutex_once);
|
|
60
|
+
uv_mutex_lock(&process_title_mutex);
|
|
61
|
+
|
|
62
|
+
uv__free(process_title);
|
|
63
|
+
process_title = new_title;
|
|
64
|
+
setproctitle("%s", title);
|
|
65
|
+
|
|
66
|
+
uv_mutex_unlock(&process_title_mutex);
|
|
67
|
+
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
int uv_get_process_title(char* buffer, size_t size) {
|
|
73
|
+
size_t len;
|
|
74
|
+
|
|
75
|
+
if (buffer == NULL || size == 0)
|
|
76
|
+
return UV_EINVAL;
|
|
77
|
+
|
|
78
|
+
uv_once(&process_title_mutex_once, init_process_title_mutex_once);
|
|
79
|
+
uv_mutex_lock(&process_title_mutex);
|
|
80
|
+
|
|
81
|
+
if (process_title != NULL) {
|
|
82
|
+
len = strlen(process_title) + 1;
|
|
83
|
+
|
|
84
|
+
if (size < len) {
|
|
85
|
+
uv_mutex_unlock(&process_title_mutex);
|
|
86
|
+
return UV_ENOBUFS;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
memcpy(buffer, process_title, len);
|
|
90
|
+
} else {
|
|
91
|
+
len = 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
uv_mutex_unlock(&process_title_mutex);
|
|
95
|
+
|
|
96
|
+
buffer[len] = '\0';
|
|
97
|
+
|
|
98
|
+
return 0;
|
|
99
|
+
}
|