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
|
@@ -30,6 +30,19 @@
|
|
|
30
30
|
#include <stdlib.h>
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
/* Does the file path contain embedded nul bytes? */
|
|
34
|
+
static int includes_nul(const char *s, size_t n) {
|
|
35
|
+
if (n == 0)
|
|
36
|
+
return 0;
|
|
37
|
+
#ifdef __linux__
|
|
38
|
+
/* Accept abstract socket namespace path ("\0/virtual/path"). */
|
|
39
|
+
s++;
|
|
40
|
+
n--;
|
|
41
|
+
#endif
|
|
42
|
+
return NULL != memchr(s, '\0', n);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
33
46
|
int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) {
|
|
34
47
|
uv__stream_init(loop, (uv_stream_t*)handle, UV_NAMED_PIPE);
|
|
35
48
|
handle->shutdown_req = NULL;
|
|
@@ -41,25 +54,68 @@ int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) {
|
|
|
41
54
|
|
|
42
55
|
|
|
43
56
|
int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
|
|
57
|
+
return uv_pipe_bind2(handle, name, strlen(name), 0);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
int uv_pipe_bind2(uv_pipe_t* handle,
|
|
62
|
+
const char* name,
|
|
63
|
+
size_t namelen,
|
|
64
|
+
unsigned int flags) {
|
|
44
65
|
struct sockaddr_un saddr;
|
|
45
|
-
|
|
66
|
+
char* pipe_fname;
|
|
46
67
|
int sockfd;
|
|
47
68
|
int err;
|
|
69
|
+
socklen_t addrlen;
|
|
48
70
|
|
|
49
71
|
pipe_fname = NULL;
|
|
50
|
-
|
|
72
|
+
|
|
73
|
+
if (flags & ~UV_PIPE_NO_TRUNCATE)
|
|
74
|
+
return UV_EINVAL;
|
|
75
|
+
|
|
76
|
+
if (name == NULL)
|
|
77
|
+
return UV_EINVAL;
|
|
78
|
+
|
|
79
|
+
/* namelen==0 on Linux means autobind the listen socket in the abstract
|
|
80
|
+
* socket namespace, see `man 7 unix` for details.
|
|
81
|
+
*/
|
|
82
|
+
#if !defined(__linux__)
|
|
83
|
+
if (namelen == 0)
|
|
84
|
+
return UV_EINVAL;
|
|
85
|
+
#endif
|
|
86
|
+
|
|
87
|
+
if (includes_nul(name, namelen))
|
|
88
|
+
return UV_EINVAL;
|
|
89
|
+
|
|
90
|
+
if (flags & UV_PIPE_NO_TRUNCATE)
|
|
91
|
+
if (namelen > sizeof(saddr.sun_path))
|
|
92
|
+
return UV_EINVAL;
|
|
93
|
+
|
|
94
|
+
/* Truncate long paths. Documented behavior. */
|
|
95
|
+
if (namelen > sizeof(saddr.sun_path))
|
|
96
|
+
namelen = sizeof(saddr.sun_path);
|
|
51
97
|
|
|
52
98
|
/* Already bound? */
|
|
53
99
|
if (uv__stream_fd(handle) >= 0)
|
|
54
|
-
return
|
|
100
|
+
return UV_EINVAL;
|
|
55
101
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (pipe_fname == NULL)
|
|
59
|
-
return -ENOMEM;
|
|
102
|
+
if (uv__is_closing(handle))
|
|
103
|
+
return UV_EINVAL;
|
|
60
104
|
|
|
61
|
-
/*
|
|
62
|
-
|
|
105
|
+
/* Make a copy of the file path unless it is an abstract socket.
|
|
106
|
+
* We unlink the file later but abstract sockets disappear
|
|
107
|
+
* automatically since they're not real file system entities.
|
|
108
|
+
*/
|
|
109
|
+
if (*name == '\0') {
|
|
110
|
+
addrlen = offsetof(struct sockaddr_un, sun_path) + namelen;
|
|
111
|
+
} else {
|
|
112
|
+
pipe_fname = uv__malloc(namelen + 1);
|
|
113
|
+
if (pipe_fname == NULL)
|
|
114
|
+
return UV_ENOMEM;
|
|
115
|
+
memcpy(pipe_fname, name, namelen);
|
|
116
|
+
pipe_fname[namelen] = '\0';
|
|
117
|
+
addrlen = sizeof saddr;
|
|
118
|
+
}
|
|
63
119
|
|
|
64
120
|
err = uv__socket(AF_UNIX, SOCK_STREAM, 0);
|
|
65
121
|
if (err < 0)
|
|
@@ -67,42 +123,53 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
|
|
|
67
123
|
sockfd = err;
|
|
68
124
|
|
|
69
125
|
memset(&saddr, 0, sizeof saddr);
|
|
70
|
-
|
|
71
|
-
saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0';
|
|
126
|
+
memcpy(&saddr.sun_path, name, namelen);
|
|
72
127
|
saddr.sun_family = AF_UNIX;
|
|
73
128
|
|
|
74
|
-
if (bind(sockfd, (struct sockaddr*)&saddr,
|
|
75
|
-
err =
|
|
129
|
+
if (bind(sockfd, (struct sockaddr*)&saddr, addrlen)) {
|
|
130
|
+
err = UV__ERR(errno);
|
|
76
131
|
/* Convert ENOENT to EACCES for compatibility with Windows. */
|
|
77
|
-
if (err ==
|
|
78
|
-
err =
|
|
79
|
-
|
|
132
|
+
if (err == UV_ENOENT)
|
|
133
|
+
err = UV_EACCES;
|
|
134
|
+
|
|
135
|
+
uv__close(sockfd);
|
|
136
|
+
goto err_socket;
|
|
80
137
|
}
|
|
81
138
|
|
|
82
139
|
/* Success. */
|
|
83
|
-
handle->
|
|
140
|
+
handle->flags |= UV_HANDLE_BOUND;
|
|
141
|
+
handle->pipe_fname = pipe_fname; /* NULL or a copy of |name| */
|
|
84
142
|
handle->io_watcher.fd = sockfd;
|
|
85
143
|
return 0;
|
|
86
144
|
|
|
87
|
-
err_bind:
|
|
88
|
-
uv__close(sockfd);
|
|
89
|
-
|
|
90
145
|
err_socket:
|
|
91
|
-
uv__free(
|
|
146
|
+
uv__free(pipe_fname);
|
|
92
147
|
return err;
|
|
93
148
|
}
|
|
94
149
|
|
|
95
150
|
|
|
96
|
-
int
|
|
151
|
+
int uv__pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) {
|
|
97
152
|
if (uv__stream_fd(handle) == -1)
|
|
98
|
-
return
|
|
153
|
+
return UV_EINVAL;
|
|
154
|
+
|
|
155
|
+
if (handle->ipc)
|
|
156
|
+
return UV_EINVAL;
|
|
157
|
+
|
|
158
|
+
#if defined(__MVS__) || defined(__PASE__)
|
|
159
|
+
/* On zOS, backlog=0 has undefined behaviour */
|
|
160
|
+
/* On IBMi PASE, backlog=0 leads to "Connection refused" error */
|
|
161
|
+
if (backlog == 0)
|
|
162
|
+
backlog = 1;
|
|
163
|
+
else if (backlog < 0)
|
|
164
|
+
backlog = SOMAXCONN;
|
|
165
|
+
#endif
|
|
99
166
|
|
|
100
167
|
if (listen(uv__stream_fd(handle), backlog))
|
|
101
|
-
return
|
|
168
|
+
return UV__ERR(errno);
|
|
102
169
|
|
|
103
170
|
handle->connection_cb = cb;
|
|
104
171
|
handle->io_watcher.cb = uv__server_io;
|
|
105
|
-
uv__io_start(handle->loop, &handle->io_watcher,
|
|
172
|
+
uv__io_start(handle->loop, &handle->io_watcher, POLLIN);
|
|
106
173
|
return 0;
|
|
107
174
|
}
|
|
108
175
|
|
|
@@ -125,7 +192,20 @@ void uv__pipe_close(uv_pipe_t* handle) {
|
|
|
125
192
|
|
|
126
193
|
|
|
127
194
|
int uv_pipe_open(uv_pipe_t* handle, uv_file fd) {
|
|
195
|
+
int flags;
|
|
196
|
+
int mode;
|
|
128
197
|
int err;
|
|
198
|
+
flags = 0;
|
|
199
|
+
|
|
200
|
+
if (uv__fd_exists(handle->loop, fd))
|
|
201
|
+
return UV_EEXIST;
|
|
202
|
+
|
|
203
|
+
do
|
|
204
|
+
mode = fcntl(fd, F_GETFL);
|
|
205
|
+
while (mode == -1 && errno == EINTR);
|
|
206
|
+
|
|
207
|
+
if (mode == -1)
|
|
208
|
+
return UV__ERR(errno); /* according to docs, must be EBADF */
|
|
129
209
|
|
|
130
210
|
err = uv__nonblock(fd, 1);
|
|
131
211
|
if (err)
|
|
@@ -137,9 +217,13 @@ int uv_pipe_open(uv_pipe_t* handle, uv_file fd) {
|
|
|
137
217
|
return err;
|
|
138
218
|
#endif /* defined(__APPLE__) */
|
|
139
219
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
220
|
+
mode &= O_ACCMODE;
|
|
221
|
+
if (mode != O_WRONLY)
|
|
222
|
+
flags |= UV_HANDLE_READABLE;
|
|
223
|
+
if (mode != O_RDONLY)
|
|
224
|
+
flags |= UV_HANDLE_WRITABLE;
|
|
225
|
+
|
|
226
|
+
return uv__stream_open((uv_stream_t*)handle, fd, flags);
|
|
143
227
|
}
|
|
144
228
|
|
|
145
229
|
|
|
@@ -147,10 +231,56 @@ void uv_pipe_connect(uv_connect_t* req,
|
|
|
147
231
|
uv_pipe_t* handle,
|
|
148
232
|
const char* name,
|
|
149
233
|
uv_connect_cb cb) {
|
|
234
|
+
int err;
|
|
235
|
+
|
|
236
|
+
err = uv_pipe_connect2(req, handle, name, strlen(name), 0, cb);
|
|
237
|
+
|
|
238
|
+
if (err) {
|
|
239
|
+
handle->delayed_error = err;
|
|
240
|
+
handle->connect_req = req;
|
|
241
|
+
|
|
242
|
+
uv__req_init(handle->loop, req, UV_CONNECT);
|
|
243
|
+
req->handle = (uv_stream_t*) handle;
|
|
244
|
+
req->cb = cb;
|
|
245
|
+
uv__queue_init(&req->queue);
|
|
246
|
+
|
|
247
|
+
/* Force callback to run on next tick in case of error. */
|
|
248
|
+
uv__io_feed(handle->loop, &handle->io_watcher);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
int uv_pipe_connect2(uv_connect_t* req,
|
|
254
|
+
uv_pipe_t* handle,
|
|
255
|
+
const char* name,
|
|
256
|
+
size_t namelen,
|
|
257
|
+
unsigned int flags,
|
|
258
|
+
uv_connect_cb cb) {
|
|
150
259
|
struct sockaddr_un saddr;
|
|
151
260
|
int new_sock;
|
|
152
261
|
int err;
|
|
153
262
|
int r;
|
|
263
|
+
socklen_t addrlen;
|
|
264
|
+
|
|
265
|
+
if (flags & ~UV_PIPE_NO_TRUNCATE)
|
|
266
|
+
return UV_EINVAL;
|
|
267
|
+
|
|
268
|
+
if (name == NULL)
|
|
269
|
+
return UV_EINVAL;
|
|
270
|
+
|
|
271
|
+
if (namelen == 0)
|
|
272
|
+
return UV_EINVAL;
|
|
273
|
+
|
|
274
|
+
if (includes_nul(name, namelen))
|
|
275
|
+
return UV_EINVAL;
|
|
276
|
+
|
|
277
|
+
if (flags & UV_PIPE_NO_TRUNCATE)
|
|
278
|
+
if (namelen > sizeof(saddr.sun_path))
|
|
279
|
+
return UV_EINVAL;
|
|
280
|
+
|
|
281
|
+
/* Truncate long paths. Documented behavior. */
|
|
282
|
+
if (namelen > sizeof(saddr.sun_path))
|
|
283
|
+
namelen = sizeof(saddr.sun_path);
|
|
154
284
|
|
|
155
285
|
new_sock = (uv__stream_fd(handle) == -1);
|
|
156
286
|
|
|
@@ -162,18 +292,29 @@ void uv_pipe_connect(uv_connect_t* req,
|
|
|
162
292
|
}
|
|
163
293
|
|
|
164
294
|
memset(&saddr, 0, sizeof saddr);
|
|
165
|
-
|
|
166
|
-
saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0';
|
|
295
|
+
memcpy(&saddr.sun_path, name, namelen);
|
|
167
296
|
saddr.sun_family = AF_UNIX;
|
|
168
297
|
|
|
298
|
+
if (*name == '\0')
|
|
299
|
+
addrlen = offsetof(struct sockaddr_un, sun_path) + namelen;
|
|
300
|
+
else
|
|
301
|
+
addrlen = sizeof saddr;
|
|
302
|
+
|
|
169
303
|
do {
|
|
170
|
-
r = connect(uv__stream_fd(handle),
|
|
171
|
-
(struct sockaddr*)&saddr, sizeof saddr);
|
|
304
|
+
r = connect(uv__stream_fd(handle), (struct sockaddr*)&saddr, addrlen);
|
|
172
305
|
}
|
|
173
306
|
while (r == -1 && errno == EINTR);
|
|
174
307
|
|
|
175
308
|
if (r == -1 && errno != EINPROGRESS) {
|
|
176
|
-
err =
|
|
309
|
+
err = UV__ERR(errno);
|
|
310
|
+
#if defined(__CYGWIN__) || defined(__MSYS__)
|
|
311
|
+
/* EBADF is supposed to mean that the socket fd is bad, but
|
|
312
|
+
Cygwin reports EBADF instead of ENOTSOCK when the file is
|
|
313
|
+
not a socket. We do not expect to see a bad fd here
|
|
314
|
+
(e.g. due to new_sock), so translate the error. */
|
|
315
|
+
if (err == UV_EBADF)
|
|
316
|
+
err = UV_ENOTSOCK;
|
|
317
|
+
#endif
|
|
177
318
|
goto out;
|
|
178
319
|
}
|
|
179
320
|
|
|
@@ -181,67 +322,79 @@ void uv_pipe_connect(uv_connect_t* req,
|
|
|
181
322
|
if (new_sock) {
|
|
182
323
|
err = uv__stream_open((uv_stream_t*)handle,
|
|
183
324
|
uv__stream_fd(handle),
|
|
184
|
-
|
|
325
|
+
UV_HANDLE_READABLE | UV_HANDLE_WRITABLE);
|
|
185
326
|
}
|
|
186
327
|
|
|
187
328
|
if (err == 0)
|
|
188
|
-
uv__io_start(handle->loop, &handle->io_watcher,
|
|
329
|
+
uv__io_start(handle->loop, &handle->io_watcher, POLLOUT);
|
|
189
330
|
|
|
190
331
|
out:
|
|
191
332
|
handle->delayed_error = err;
|
|
192
333
|
handle->connect_req = req;
|
|
193
334
|
|
|
194
335
|
uv__req_init(handle->loop, req, UV_CONNECT);
|
|
195
|
-
req->handle = (uv_stream_t*)handle;
|
|
336
|
+
req->handle = (uv_stream_t*) handle;
|
|
196
337
|
req->cb = cb;
|
|
197
|
-
|
|
338
|
+
uv__queue_init(&req->queue);
|
|
198
339
|
|
|
199
340
|
/* Force callback to run on next tick in case of error. */
|
|
200
341
|
if (err)
|
|
201
342
|
uv__io_feed(handle->loop, &handle->io_watcher);
|
|
202
343
|
|
|
203
|
-
|
|
204
|
-
* return 0 and let the callback handle errors.
|
|
205
|
-
*/
|
|
344
|
+
return 0;
|
|
206
345
|
}
|
|
207
346
|
|
|
208
347
|
|
|
209
|
-
typedef int (*uv__peersockfunc)(int, struct sockaddr*, socklen_t*);
|
|
210
|
-
|
|
211
|
-
|
|
212
348
|
static int uv__pipe_getsockpeername(const uv_pipe_t* handle,
|
|
213
349
|
uv__peersockfunc func,
|
|
214
350
|
char* buffer,
|
|
215
351
|
size_t* size) {
|
|
352
|
+
#if defined(__linux__)
|
|
353
|
+
static const int is_linux = 1;
|
|
354
|
+
#else
|
|
355
|
+
static const int is_linux = 0;
|
|
356
|
+
#endif
|
|
216
357
|
struct sockaddr_un sa;
|
|
217
358
|
socklen_t addrlen;
|
|
359
|
+
size_t slop;
|
|
360
|
+
char* p;
|
|
218
361
|
int err;
|
|
219
362
|
|
|
220
363
|
addrlen = sizeof(sa);
|
|
221
364
|
memset(&sa, 0, addrlen);
|
|
222
|
-
err =
|
|
365
|
+
err = uv__getsockpeername((const uv_handle_t*) handle,
|
|
366
|
+
func,
|
|
367
|
+
(struct sockaddr*) &sa,
|
|
368
|
+
(int*) &addrlen);
|
|
223
369
|
if (err < 0) {
|
|
224
370
|
*size = 0;
|
|
225
|
-
return
|
|
371
|
+
return err;
|
|
226
372
|
}
|
|
227
373
|
|
|
228
|
-
|
|
229
|
-
if (sa.sun_path[0] == 0)
|
|
230
|
-
/* Linux abstract namespace */
|
|
374
|
+
slop = 1;
|
|
375
|
+
if (is_linux && sa.sun_path[0] == '\0') {
|
|
376
|
+
/* Linux abstract namespace. Not zero-terminated. */
|
|
377
|
+
slop = 0;
|
|
231
378
|
addrlen -= offsetof(struct sockaddr_un, sun_path);
|
|
232
|
-
else
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
379
|
+
} else {
|
|
380
|
+
p = memchr(sa.sun_path, '\0', sizeof(sa.sun_path));
|
|
381
|
+
if (p == NULL)
|
|
382
|
+
p = ARRAY_END(sa.sun_path);
|
|
383
|
+
addrlen = p - sa.sun_path;
|
|
384
|
+
}
|
|
236
385
|
|
|
237
|
-
if (addrlen > *size) {
|
|
238
|
-
*size = addrlen;
|
|
386
|
+
if ((size_t)addrlen + slop > *size) {
|
|
387
|
+
*size = addrlen + slop;
|
|
239
388
|
return UV_ENOBUFS;
|
|
240
389
|
}
|
|
241
390
|
|
|
242
391
|
memcpy(buffer, sa.sun_path, addrlen);
|
|
243
392
|
*size = addrlen;
|
|
244
393
|
|
|
394
|
+
/* only null-terminate if it's not an abstract socket */
|
|
395
|
+
if (buffer[0] != '\0')
|
|
396
|
+
buffer[addrlen] = '\0';
|
|
397
|
+
|
|
245
398
|
return 0;
|
|
246
399
|
}
|
|
247
400
|
|
|
@@ -284,5 +437,121 @@ uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle) {
|
|
|
284
437
|
if (handle->accepted_fd == -1)
|
|
285
438
|
return UV_UNKNOWN_HANDLE;
|
|
286
439
|
else
|
|
287
|
-
return
|
|
440
|
+
return uv_guess_handle(handle->accepted_fd);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
int uv_pipe_chmod(uv_pipe_t* handle, int mode) {
|
|
445
|
+
unsigned desired_mode;
|
|
446
|
+
struct stat pipe_stat;
|
|
447
|
+
char* name_buffer;
|
|
448
|
+
size_t name_len;
|
|
449
|
+
int r;
|
|
450
|
+
|
|
451
|
+
if (handle == NULL || uv__stream_fd(handle) == -1)
|
|
452
|
+
return UV_EBADF;
|
|
453
|
+
|
|
454
|
+
if (mode != UV_READABLE &&
|
|
455
|
+
mode != UV_WRITABLE &&
|
|
456
|
+
mode != (UV_WRITABLE | UV_READABLE))
|
|
457
|
+
return UV_EINVAL;
|
|
458
|
+
|
|
459
|
+
/* Unfortunately fchmod does not work on all platforms, we will use chmod. */
|
|
460
|
+
name_len = 0;
|
|
461
|
+
r = uv_pipe_getsockname(handle, NULL, &name_len);
|
|
462
|
+
if (r != UV_ENOBUFS)
|
|
463
|
+
return r;
|
|
464
|
+
|
|
465
|
+
name_buffer = uv__malloc(name_len);
|
|
466
|
+
if (name_buffer == NULL)
|
|
467
|
+
return UV_ENOMEM;
|
|
468
|
+
|
|
469
|
+
r = uv_pipe_getsockname(handle, name_buffer, &name_len);
|
|
470
|
+
if (r != 0) {
|
|
471
|
+
uv__free(name_buffer);
|
|
472
|
+
return r;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/* stat must be used as fstat has a bug on Darwin */
|
|
476
|
+
if (uv__stat(name_buffer, &pipe_stat) == -1) {
|
|
477
|
+
uv__free(name_buffer);
|
|
478
|
+
return -errno;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
desired_mode = 0;
|
|
482
|
+
if (mode & UV_READABLE)
|
|
483
|
+
desired_mode |= S_IRUSR | S_IRGRP | S_IROTH;
|
|
484
|
+
if (mode & UV_WRITABLE)
|
|
485
|
+
desired_mode |= S_IWUSR | S_IWGRP | S_IWOTH;
|
|
486
|
+
|
|
487
|
+
/* Exit early if pipe already has desired mode. */
|
|
488
|
+
if ((pipe_stat.st_mode & desired_mode) == desired_mode) {
|
|
489
|
+
uv__free(name_buffer);
|
|
490
|
+
return 0;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
pipe_stat.st_mode |= desired_mode;
|
|
494
|
+
|
|
495
|
+
r = chmod(name_buffer, pipe_stat.st_mode);
|
|
496
|
+
uv__free(name_buffer);
|
|
497
|
+
|
|
498
|
+
return r != -1 ? 0 : UV__ERR(errno);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
int uv_pipe(uv_os_fd_t fds[2], int read_flags, int write_flags) {
|
|
503
|
+
uv_os_fd_t temp[2];
|
|
504
|
+
int err;
|
|
505
|
+
#if defined(__linux__) || \
|
|
506
|
+
defined(__FreeBSD__) || \
|
|
507
|
+
defined(__OpenBSD__) || \
|
|
508
|
+
defined(__DragonFly__) || \
|
|
509
|
+
defined(__NetBSD__)
|
|
510
|
+
int flags = O_CLOEXEC;
|
|
511
|
+
|
|
512
|
+
if ((read_flags & UV_NONBLOCK_PIPE) && (write_flags & UV_NONBLOCK_PIPE))
|
|
513
|
+
flags |= UV_FS_O_NONBLOCK;
|
|
514
|
+
|
|
515
|
+
if (pipe2(temp, flags))
|
|
516
|
+
return UV__ERR(errno);
|
|
517
|
+
|
|
518
|
+
if (flags & UV_FS_O_NONBLOCK) {
|
|
519
|
+
fds[0] = temp[0];
|
|
520
|
+
fds[1] = temp[1];
|
|
521
|
+
return 0;
|
|
522
|
+
}
|
|
523
|
+
#else
|
|
524
|
+
if (pipe(temp))
|
|
525
|
+
return UV__ERR(errno);
|
|
526
|
+
|
|
527
|
+
if ((err = uv__cloexec(temp[0], 1)))
|
|
528
|
+
goto fail;
|
|
529
|
+
|
|
530
|
+
if ((err = uv__cloexec(temp[1], 1)))
|
|
531
|
+
goto fail;
|
|
532
|
+
#endif
|
|
533
|
+
|
|
534
|
+
if (read_flags & UV_NONBLOCK_PIPE)
|
|
535
|
+
if ((err = uv__nonblock(temp[0], 1)))
|
|
536
|
+
goto fail;
|
|
537
|
+
|
|
538
|
+
if (write_flags & UV_NONBLOCK_PIPE)
|
|
539
|
+
if ((err = uv__nonblock(temp[1], 1)))
|
|
540
|
+
goto fail;
|
|
541
|
+
|
|
542
|
+
fds[0] = temp[0];
|
|
543
|
+
fds[1] = temp[1];
|
|
544
|
+
return 0;
|
|
545
|
+
|
|
546
|
+
fail:
|
|
547
|
+
uv__close(temp[0]);
|
|
548
|
+
uv__close(temp[1]);
|
|
549
|
+
return err;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
int uv__make_pipe(int fds[2], int flags) {
|
|
554
|
+
return uv_pipe(fds,
|
|
555
|
+
flags & UV_NONBLOCK_PIPE,
|
|
556
|
+
flags & UV_NONBLOCK_PIPE);
|
|
288
557
|
}
|
|
@@ -33,18 +33,33 @@ static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
|
|
|
33
33
|
|
|
34
34
|
handle = container_of(w, uv_poll_t, io_watcher);
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
/*
|
|
37
|
+
* As documented in the kernel source fs/kernfs/file.c #780
|
|
38
|
+
* poll will return POLLERR|POLLPRI in case of sysfs
|
|
39
|
+
* polling. This does not happen in case of out-of-band
|
|
40
|
+
* TCP messages.
|
|
41
|
+
*
|
|
42
|
+
* The above is the case on (at least) FreeBSD and Linux.
|
|
43
|
+
*
|
|
44
|
+
* So to properly determine a POLLPRI or a POLLERR we need
|
|
45
|
+
* to check for both.
|
|
46
|
+
*/
|
|
47
|
+
if ((events & POLLERR) && !(events & UV__POLLPRI)) {
|
|
48
|
+
uv__io_stop(loop, w, POLLIN | POLLOUT | UV__POLLRDHUP | UV__POLLPRI);
|
|
38
49
|
uv__handle_stop(handle);
|
|
39
|
-
handle->poll_cb(handle,
|
|
50
|
+
handle->poll_cb(handle, UV_EBADF, 0);
|
|
40
51
|
return;
|
|
41
52
|
}
|
|
42
53
|
|
|
43
54
|
pevents = 0;
|
|
44
|
-
if (events &
|
|
55
|
+
if (events & POLLIN)
|
|
45
56
|
pevents |= UV_READABLE;
|
|
46
|
-
if (events &
|
|
57
|
+
if (events & UV__POLLPRI)
|
|
58
|
+
pevents |= UV_PRIORITIZED;
|
|
59
|
+
if (events & POLLOUT)
|
|
47
60
|
pevents |= UV_WRITABLE;
|
|
61
|
+
if (events & UV__POLLRDHUP)
|
|
62
|
+
pevents |= UV_DISCONNECT;
|
|
48
63
|
|
|
49
64
|
handle->poll_cb(handle, 0, pevents);
|
|
50
65
|
}
|
|
@@ -53,7 +68,22 @@ static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
|
|
|
53
68
|
int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) {
|
|
54
69
|
int err;
|
|
55
70
|
|
|
71
|
+
if (uv__fd_exists(loop, fd))
|
|
72
|
+
return UV_EEXIST;
|
|
73
|
+
|
|
74
|
+
err = uv__io_check_fd(loop, fd);
|
|
75
|
+
if (err)
|
|
76
|
+
return err;
|
|
77
|
+
|
|
78
|
+
/* If ioctl(FIONBIO) reports ENOTTY, try fcntl(F_GETFL) + fcntl(F_SETFL).
|
|
79
|
+
* Workaround for e.g. kqueue fds not supporting ioctls.
|
|
80
|
+
*/
|
|
56
81
|
err = uv__nonblock(fd, 1);
|
|
82
|
+
#if UV__NONBLOCK_IS_IOCTL
|
|
83
|
+
if (err == UV_ENOTTY)
|
|
84
|
+
err = uv__nonblock_fcntl(fd, 1);
|
|
85
|
+
#endif
|
|
86
|
+
|
|
57
87
|
if (err)
|
|
58
88
|
return err;
|
|
59
89
|
|
|
@@ -71,23 +101,36 @@ int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle,
|
|
|
71
101
|
|
|
72
102
|
|
|
73
103
|
static void uv__poll_stop(uv_poll_t* handle) {
|
|
74
|
-
uv__io_stop(handle->loop,
|
|
104
|
+
uv__io_stop(handle->loop,
|
|
105
|
+
&handle->io_watcher,
|
|
106
|
+
POLLIN | POLLOUT | UV__POLLRDHUP | UV__POLLPRI);
|
|
75
107
|
uv__handle_stop(handle);
|
|
108
|
+
uv__platform_invalidate_fd(handle->loop, handle->io_watcher.fd);
|
|
76
109
|
}
|
|
77
110
|
|
|
78
111
|
|
|
79
112
|
int uv_poll_stop(uv_poll_t* handle) {
|
|
80
|
-
assert(!(handle
|
|
113
|
+
assert(!uv__is_closing(handle));
|
|
81
114
|
uv__poll_stop(handle);
|
|
82
115
|
return 0;
|
|
83
116
|
}
|
|
84
117
|
|
|
85
118
|
|
|
86
119
|
int uv_poll_start(uv_poll_t* handle, int pevents, uv_poll_cb poll_cb) {
|
|
120
|
+
uv__io_t** watchers;
|
|
121
|
+
uv__io_t* w;
|
|
87
122
|
int events;
|
|
88
123
|
|
|
89
|
-
assert((pevents & ~(UV_READABLE | UV_WRITABLE
|
|
90
|
-
|
|
124
|
+
assert((pevents & ~(UV_READABLE | UV_WRITABLE | UV_DISCONNECT |
|
|
125
|
+
UV_PRIORITIZED)) == 0);
|
|
126
|
+
assert(!uv__is_closing(handle));
|
|
127
|
+
|
|
128
|
+
watchers = handle->loop->watchers;
|
|
129
|
+
w = &handle->io_watcher;
|
|
130
|
+
|
|
131
|
+
if (uv__fd_exists(handle->loop, w->fd))
|
|
132
|
+
if (watchers[w->fd] != w)
|
|
133
|
+
return UV_EEXIST;
|
|
91
134
|
|
|
92
135
|
uv__poll_stop(handle);
|
|
93
136
|
|
|
@@ -96,9 +139,13 @@ int uv_poll_start(uv_poll_t* handle, int pevents, uv_poll_cb poll_cb) {
|
|
|
96
139
|
|
|
97
140
|
events = 0;
|
|
98
141
|
if (pevents & UV_READABLE)
|
|
99
|
-
events |=
|
|
142
|
+
events |= POLLIN;
|
|
143
|
+
if (pevents & UV_PRIORITIZED)
|
|
144
|
+
events |= UV__POLLPRI;
|
|
100
145
|
if (pevents & UV_WRITABLE)
|
|
101
|
-
events |=
|
|
146
|
+
events |= POLLOUT;
|
|
147
|
+
if (pevents & UV_DISCONNECT)
|
|
148
|
+
events |= UV__POLLRDHUP;
|
|
102
149
|
|
|
103
150
|
uv__io_start(handle->loop, &handle->io_watcher, events);
|
|
104
151
|
uv__handle_start(handle);
|
|
@@ -0,0 +1,36 @@
|
|
|
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 <time.h>
|
|
28
|
+
|
|
29
|
+
uint64_t uv__hrtime(uv_clocktype_t type) {
|
|
30
|
+
struct timespec t;
|
|
31
|
+
|
|
32
|
+
if (clock_gettime(CLOCK_MONOTONIC, &t))
|
|
33
|
+
abort();
|
|
34
|
+
|
|
35
|
+
return t.tv_sec * (uint64_t) 1e9 + t.tv_nsec;
|
|
36
|
+
}
|