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
|
@@ -0,0 +1,93 @@
|
|
|
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/sysinfo.h>
|
|
26
|
+
#include <unistd.h>
|
|
27
|
+
|
|
28
|
+
int uv_uptime(double* uptime) {
|
|
29
|
+
struct sysinfo info;
|
|
30
|
+
|
|
31
|
+
if (sysinfo(&info) < 0)
|
|
32
|
+
return UV__ERR(errno);
|
|
33
|
+
|
|
34
|
+
*uptime = info.uptime;
|
|
35
|
+
return 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
int uv_resident_set_memory(size_t* rss) {
|
|
39
|
+
char buf[1024];
|
|
40
|
+
const char* s;
|
|
41
|
+
long val;
|
|
42
|
+
int rc;
|
|
43
|
+
int i;
|
|
44
|
+
struct sysinfo si;
|
|
45
|
+
|
|
46
|
+
/* rss: 24th element */
|
|
47
|
+
rc = uv__slurp("/proc/self/stat", buf, sizeof(buf));
|
|
48
|
+
if (rc < 0)
|
|
49
|
+
return rc;
|
|
50
|
+
|
|
51
|
+
/* find the last ')' */
|
|
52
|
+
s = strrchr(buf, ')');
|
|
53
|
+
if (s == NULL)
|
|
54
|
+
goto err;
|
|
55
|
+
|
|
56
|
+
for (i = 1; i <= 22; i++) {
|
|
57
|
+
s = strchr(s + 1, ' ');
|
|
58
|
+
if (s == NULL)
|
|
59
|
+
goto err;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
errno = 0;
|
|
63
|
+
val = strtol(s, NULL, 10);
|
|
64
|
+
if (val < 0 || errno != 0)
|
|
65
|
+
goto err;
|
|
66
|
+
|
|
67
|
+
do
|
|
68
|
+
rc = sysinfo(&si);
|
|
69
|
+
while (rc == -1 && errno == EINTR);
|
|
70
|
+
if (rc == -1)
|
|
71
|
+
return UV__ERR(errno);
|
|
72
|
+
|
|
73
|
+
*rss = val * si.mem_unit;
|
|
74
|
+
return 0;
|
|
75
|
+
|
|
76
|
+
err:
|
|
77
|
+
return UV_EINVAL;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
|
|
81
|
+
/* FIXME: read /proc/stat? */
|
|
82
|
+
*cpu_infos = NULL;
|
|
83
|
+
*count = 0;
|
|
84
|
+
return UV_ENOSYS;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
uint64_t uv_get_constrained_memory(void) {
|
|
88
|
+
return 0; /* Memory constraints are unknown. */
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
uint64_t uv_get_available_memory(void) {
|
|
92
|
+
return uv_get_free_memory();
|
|
93
|
+
}
|
|
@@ -18,37 +18,32 @@
|
|
|
18
18
|
* IN THE SOFTWARE.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
#include "uv.h"
|
|
22
|
+
#include "internal.h"
|
|
23
|
+
|
|
21
24
|
#include <dlfcn.h>
|
|
22
25
|
#include <errno.h>
|
|
26
|
+
#include <pthread.h>
|
|
23
27
|
#include <stdlib.h>
|
|
24
28
|
#include <string.h>
|
|
25
29
|
|
|
26
30
|
#include <TargetConditionals.h>
|
|
27
31
|
|
|
28
32
|
#if !TARGET_OS_IPHONE
|
|
29
|
-
#
|
|
30
|
-
# include <ApplicationServices/ApplicationServices.h>
|
|
33
|
+
#include "darwin-stub.h"
|
|
31
34
|
#endif
|
|
32
35
|
|
|
33
36
|
|
|
34
37
|
static int uv__pthread_setname_np(const char* name) {
|
|
35
|
-
int (*dynamic_pthread_setname_np)(const char* name);
|
|
36
38
|
char namebuf[64]; /* MAXTHREADNAMESIZE */
|
|
37
39
|
int err;
|
|
38
40
|
|
|
39
|
-
/* pthread_setname_np() first appeared in OS X 10.6 and iOS 3.2. */
|
|
40
|
-
*(void **)(&dynamic_pthread_setname_np) =
|
|
41
|
-
dlsym(RTLD_DEFAULT, "pthread_setname_np");
|
|
42
|
-
|
|
43
|
-
if (dynamic_pthread_setname_np == NULL)
|
|
44
|
-
return -ENOSYS;
|
|
45
|
-
|
|
46
41
|
strncpy(namebuf, name, sizeof(namebuf) - 1);
|
|
47
42
|
namebuf[sizeof(namebuf) - 1] = '\0';
|
|
48
43
|
|
|
49
|
-
err =
|
|
44
|
+
err = pthread_setname_np(namebuf);
|
|
50
45
|
if (err)
|
|
51
|
-
return
|
|
46
|
+
return UV__ERR(err);
|
|
52
47
|
|
|
53
48
|
return 0;
|
|
54
49
|
}
|
|
@@ -76,15 +71,13 @@ int uv__set_process_title(const char* title) {
|
|
|
76
71
|
CFStringRef* display_name_key;
|
|
77
72
|
CFDictionaryRef (*pCFBundleGetInfoDictionary)(CFBundleRef);
|
|
78
73
|
CFBundleRef (*pCFBundleGetMainBundle)(void);
|
|
79
|
-
CFBundleRef hi_services_bundle;
|
|
80
|
-
OSStatus (*pSetApplicationIsDaemon)(int);
|
|
81
74
|
CFDictionaryRef (*pLSApplicationCheckIn)(int, CFDictionaryRef);
|
|
82
75
|
void (*pLSSetApplicationLaunchServicesServerConnectionStatus)(uint64_t,
|
|
83
76
|
void*);
|
|
84
77
|
CFTypeRef asn;
|
|
85
78
|
int err;
|
|
86
79
|
|
|
87
|
-
err =
|
|
80
|
+
err = UV_ENOENT;
|
|
88
81
|
application_services_handle = dlopen("/System/Library/Frameworks/"
|
|
89
82
|
"ApplicationServices.framework/"
|
|
90
83
|
"Versions/A/ApplicationServices",
|
|
@@ -148,30 +141,19 @@ int uv__set_process_title(const char* title) {
|
|
|
148
141
|
if (pCFBundleGetInfoDictionary == NULL || pCFBundleGetMainBundle == NULL)
|
|
149
142
|
goto out;
|
|
150
143
|
|
|
151
|
-
/* Black 10.9 magic, to remove (Not responding) mark in Activity Monitor */
|
|
152
|
-
hi_services_bundle =
|
|
153
|
-
pCFBundleGetBundleWithIdentifier(S("com.apple.HIServices"));
|
|
154
|
-
err = -ENOENT;
|
|
155
|
-
if (hi_services_bundle == NULL)
|
|
156
|
-
goto out;
|
|
157
|
-
|
|
158
|
-
*(void **)(&pSetApplicationIsDaemon) = pCFBundleGetFunctionPointerForName(
|
|
159
|
-
hi_services_bundle,
|
|
160
|
-
S("SetApplicationIsDaemon"));
|
|
161
144
|
*(void **)(&pLSApplicationCheckIn) = pCFBundleGetFunctionPointerForName(
|
|
162
145
|
launch_services_bundle,
|
|
163
146
|
S("_LSApplicationCheckIn"));
|
|
147
|
+
|
|
148
|
+
if (pLSApplicationCheckIn == NULL)
|
|
149
|
+
goto out;
|
|
150
|
+
|
|
164
151
|
*(void **)(&pLSSetApplicationLaunchServicesServerConnectionStatus) =
|
|
165
152
|
pCFBundleGetFunctionPointerForName(
|
|
166
153
|
launch_services_bundle,
|
|
167
154
|
S("_LSSetApplicationLaunchServicesServerConnectionStatus"));
|
|
168
|
-
if (pSetApplicationIsDaemon == NULL ||
|
|
169
|
-
pLSApplicationCheckIn == NULL ||
|
|
170
|
-
pLSSetApplicationLaunchServicesServerConnectionStatus == NULL) {
|
|
171
|
-
goto out;
|
|
172
|
-
}
|
|
173
155
|
|
|
174
|
-
if (
|
|
156
|
+
if (pLSSetApplicationLaunchServicesServerConnectionStatus == NULL)
|
|
175
157
|
goto out;
|
|
176
158
|
|
|
177
159
|
pLSSetApplicationLaunchServicesServerConnectionStatus(0, NULL);
|
|
@@ -182,7 +164,11 @@ int uv__set_process_title(const char* title) {
|
|
|
182
164
|
|
|
183
165
|
asn = pLSGetCurrentApplicationASN();
|
|
184
166
|
|
|
185
|
-
err =
|
|
167
|
+
err = UV_EBUSY;
|
|
168
|
+
if (asn == NULL)
|
|
169
|
+
goto out;
|
|
170
|
+
|
|
171
|
+
err = UV_EINVAL;
|
|
186
172
|
if (pLSSetApplicationInformationItem(-2, /* Magic value. */
|
|
187
173
|
asn,
|
|
188
174
|
*display_name_key,
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
#ifndef UV_DARWIN_STUB_H_
|
|
23
|
+
#define UV_DARWIN_STUB_H_
|
|
24
|
+
|
|
25
|
+
#include <stdint.h>
|
|
26
|
+
|
|
27
|
+
struct CFArrayCallBacks;
|
|
28
|
+
struct CFRunLoopSourceContext;
|
|
29
|
+
struct FSEventStreamContext;
|
|
30
|
+
|
|
31
|
+
typedef double CFAbsoluteTime;
|
|
32
|
+
typedef double CFTimeInterval;
|
|
33
|
+
typedef int FSEventStreamEventFlags;
|
|
34
|
+
typedef int OSStatus;
|
|
35
|
+
typedef long CFIndex;
|
|
36
|
+
typedef struct CFArrayCallBacks CFArrayCallBacks;
|
|
37
|
+
typedef struct CFRunLoopSourceContext CFRunLoopSourceContext;
|
|
38
|
+
typedef struct FSEventStreamContext FSEventStreamContext;
|
|
39
|
+
typedef uint32_t FSEventStreamCreateFlags;
|
|
40
|
+
typedef uint64_t FSEventStreamEventId;
|
|
41
|
+
typedef unsigned CFStringEncoding;
|
|
42
|
+
typedef void* CFAllocatorRef;
|
|
43
|
+
typedef void* CFArrayRef;
|
|
44
|
+
typedef void* CFBundleRef;
|
|
45
|
+
typedef void* CFDictionaryRef;
|
|
46
|
+
typedef void* CFRunLoopRef;
|
|
47
|
+
typedef void* CFRunLoopSourceRef;
|
|
48
|
+
typedef void* CFStringRef;
|
|
49
|
+
typedef void* CFTypeRef;
|
|
50
|
+
typedef void* FSEventStreamRef;
|
|
51
|
+
|
|
52
|
+
typedef void (*FSEventStreamCallback)(const FSEventStreamRef,
|
|
53
|
+
void*,
|
|
54
|
+
size_t,
|
|
55
|
+
void*,
|
|
56
|
+
const FSEventStreamEventFlags*,
|
|
57
|
+
const FSEventStreamEventId*);
|
|
58
|
+
|
|
59
|
+
struct CFRunLoopSourceContext {
|
|
60
|
+
CFIndex version;
|
|
61
|
+
void* info;
|
|
62
|
+
void* pad[7];
|
|
63
|
+
void (*perform)(void*);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
struct FSEventStreamContext {
|
|
67
|
+
CFIndex version;
|
|
68
|
+
void* info;
|
|
69
|
+
void* pad[3];
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
static const CFStringEncoding kCFStringEncodingUTF8 = 0x8000100;
|
|
73
|
+
static const OSStatus noErr = 0;
|
|
74
|
+
|
|
75
|
+
static const FSEventStreamEventId kFSEventStreamEventIdSinceNow = -1;
|
|
76
|
+
|
|
77
|
+
static const int kFSEventStreamCreateFlagNoDefer = 2;
|
|
78
|
+
static const int kFSEventStreamCreateFlagFileEvents = 16;
|
|
79
|
+
|
|
80
|
+
static const int kFSEventStreamEventFlagEventIdsWrapped = 8;
|
|
81
|
+
static const int kFSEventStreamEventFlagHistoryDone = 16;
|
|
82
|
+
static const int kFSEventStreamEventFlagItemChangeOwner = 0x4000;
|
|
83
|
+
static const int kFSEventStreamEventFlagItemCreated = 0x100;
|
|
84
|
+
static const int kFSEventStreamEventFlagItemFinderInfoMod = 0x2000;
|
|
85
|
+
static const int kFSEventStreamEventFlagItemInodeMetaMod = 0x400;
|
|
86
|
+
static const int kFSEventStreamEventFlagItemIsDir = 0x20000;
|
|
87
|
+
static const int kFSEventStreamEventFlagItemModified = 0x1000;
|
|
88
|
+
static const int kFSEventStreamEventFlagItemRemoved = 0x200;
|
|
89
|
+
static const int kFSEventStreamEventFlagItemRenamed = 0x800;
|
|
90
|
+
static const int kFSEventStreamEventFlagItemXattrMod = 0x8000;
|
|
91
|
+
static const int kFSEventStreamEventFlagKernelDropped = 4;
|
|
92
|
+
static const int kFSEventStreamEventFlagMount = 64;
|
|
93
|
+
static const int kFSEventStreamEventFlagRootChanged = 32;
|
|
94
|
+
static const int kFSEventStreamEventFlagUnmount = 128;
|
|
95
|
+
static const int kFSEventStreamEventFlagUserDropped = 2;
|
|
96
|
+
|
|
97
|
+
#endif /* UV_DARWIN_STUB_H_ */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#ifndef UV_DARWIN_SYSCALLS_H_
|
|
2
|
+
#define UV_DARWIN_SYSCALLS_H_
|
|
3
|
+
|
|
4
|
+
#include <sys/types.h>
|
|
5
|
+
#include <sys/socket.h>
|
|
6
|
+
|
|
7
|
+
/* https://github.com/apple/darwin-xnu/blob/master/bsd/sys/socket.h */
|
|
8
|
+
|
|
9
|
+
struct mmsghdr {
|
|
10
|
+
struct msghdr msg_hdr;
|
|
11
|
+
size_t msg_len;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
ssize_t recvmsg_x(int s, const struct mmsghdr* msgp, u_int cnt, int flags);
|
|
15
|
+
ssize_t sendmsg_x(int s, const struct mmsghdr* msgp, u_int cnt, int flags);
|
|
16
|
+
|
|
17
|
+
#endif /* UV_DARWIN_SYSCALLS_H_ */
|
|
@@ -25,10 +25,6 @@
|
|
|
25
25
|
#include <stdint.h>
|
|
26
26
|
#include <errno.h>
|
|
27
27
|
|
|
28
|
-
#include <ifaddrs.h>
|
|
29
|
-
#include <net/if.h>
|
|
30
|
-
#include <net/if_dl.h>
|
|
31
|
-
|
|
32
28
|
#include <mach/mach.h>
|
|
33
29
|
#include <mach/mach_time.h>
|
|
34
30
|
#include <mach-o/dyld.h> /* _NSGetExecutablePath */
|
|
@@ -36,12 +32,15 @@
|
|
|
36
32
|
#include <sys/sysctl.h>
|
|
37
33
|
#include <unistd.h> /* sysconf */
|
|
38
34
|
|
|
35
|
+
static uv_once_t once = UV_ONCE_INIT;
|
|
36
|
+
static mach_timebase_info_data_t timebase;
|
|
37
|
+
|
|
39
38
|
|
|
40
39
|
int uv__platform_loop_init(uv_loop_t* loop) {
|
|
41
40
|
loop->cf_state = NULL;
|
|
42
41
|
|
|
43
42
|
if (uv__kqueue_init(loop))
|
|
44
|
-
return
|
|
43
|
+
return UV__ERR(errno);
|
|
45
44
|
|
|
46
45
|
return 0;
|
|
47
46
|
}
|
|
@@ -52,15 +51,15 @@ void uv__platform_loop_delete(uv_loop_t* loop) {
|
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if ((ACCESS_ONCE(uint32_t, info.numer) == 0 ||
|
|
59
|
-
ACCESS_ONCE(uint32_t, info.denom) == 0) &&
|
|
60
|
-
mach_timebase_info(&info) != KERN_SUCCESS)
|
|
54
|
+
static void uv__hrtime_init_once(void) {
|
|
55
|
+
if (KERN_SUCCESS != mach_timebase_info(&timebase))
|
|
61
56
|
abort();
|
|
57
|
+
}
|
|
58
|
+
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
uint64_t uv__hrtime(uv_clocktype_t type) {
|
|
61
|
+
uv_once(&once, uv__hrtime_init_once);
|
|
62
|
+
return mach_continuous_time() * timebase.numer / timebase.denom;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
|
|
@@ -72,18 +71,18 @@ int uv_exepath(char* buffer, size_t* size) {
|
|
|
72
71
|
size_t abspath_size;
|
|
73
72
|
|
|
74
73
|
if (buffer == NULL || size == NULL || *size == 0)
|
|
75
|
-
return
|
|
74
|
+
return UV_EINVAL;
|
|
76
75
|
|
|
77
76
|
exepath_size = sizeof(exepath);
|
|
78
77
|
if (_NSGetExecutablePath(exepath, &exepath_size))
|
|
79
|
-
return
|
|
78
|
+
return UV_EIO;
|
|
80
79
|
|
|
81
80
|
if (realpath(exepath, abspath) != abspath)
|
|
82
|
-
return
|
|
81
|
+
return UV__ERR(errno);
|
|
83
82
|
|
|
84
83
|
abspath_size = strlen(abspath);
|
|
85
84
|
if (abspath_size == 0)
|
|
86
|
-
return
|
|
85
|
+
return UV_EIO;
|
|
87
86
|
|
|
88
87
|
*size -= 1;
|
|
89
88
|
if (*size > abspath_size)
|
|
@@ -102,7 +101,7 @@ uint64_t uv_get_free_memory(void) {
|
|
|
102
101
|
|
|
103
102
|
if (host_statistics(mach_host_self(), HOST_VM_INFO,
|
|
104
103
|
(host_info_t)&info, &count) != KERN_SUCCESS) {
|
|
105
|
-
return
|
|
104
|
+
return 0;
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
return (uint64_t) info.free_count * sysconf(_SC_PAGESIZE);
|
|
@@ -114,19 +113,29 @@ uint64_t uv_get_total_memory(void) {
|
|
|
114
113
|
int which[] = {CTL_HW, HW_MEMSIZE};
|
|
115
114
|
size_t size = sizeof(info);
|
|
116
115
|
|
|
117
|
-
if (sysctl(which,
|
|
118
|
-
return
|
|
116
|
+
if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0))
|
|
117
|
+
return 0;
|
|
119
118
|
|
|
120
119
|
return (uint64_t) info;
|
|
121
120
|
}
|
|
122
121
|
|
|
123
122
|
|
|
123
|
+
uint64_t uv_get_constrained_memory(void) {
|
|
124
|
+
return 0; /* Memory constraints are unknown. */
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
uint64_t uv_get_available_memory(void) {
|
|
129
|
+
return uv_get_free_memory();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
124
133
|
void uv_loadavg(double avg[3]) {
|
|
125
134
|
struct loadavg info;
|
|
126
135
|
size_t size = sizeof(info);
|
|
127
136
|
int which[] = {CTL_VM, VM_LOADAVG};
|
|
128
137
|
|
|
129
|
-
if (sysctl(which,
|
|
138
|
+
if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0) < 0) return;
|
|
130
139
|
|
|
131
140
|
avg[0] = (double) info.ldavg[0] / info.fscale;
|
|
132
141
|
avg[1] = (double) info.ldavg[1] / info.fscale;
|
|
@@ -161,8 +170,8 @@ int uv_uptime(double* uptime) {
|
|
|
161
170
|
size_t size = sizeof(info);
|
|
162
171
|
static int which[] = {CTL_KERN, KERN_BOOTTIME};
|
|
163
172
|
|
|
164
|
-
if (sysctl(which,
|
|
165
|
-
return
|
|
173
|
+
if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0))
|
|
174
|
+
return UV__ERR(errno);
|
|
166
175
|
|
|
167
176
|
now = time(NULL);
|
|
168
177
|
*uptime = now - info.tv_sec;
|
|
@@ -185,23 +194,27 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
|
|
|
185
194
|
size = sizeof(model);
|
|
186
195
|
if (sysctlbyname("machdep.cpu.brand_string", &model, &size, NULL, 0) &&
|
|
187
196
|
sysctlbyname("hw.model", &model, &size, NULL, 0)) {
|
|
188
|
-
return
|
|
197
|
+
return UV__ERR(errno);
|
|
189
198
|
}
|
|
190
199
|
|
|
200
|
+
cpuspeed = 0;
|
|
191
201
|
size = sizeof(cpuspeed);
|
|
192
|
-
|
|
193
|
-
|
|
202
|
+
sysctlbyname("hw.cpufrequency", &cpuspeed, &size, NULL, 0);
|
|
203
|
+
if (cpuspeed == 0)
|
|
204
|
+
/* If sysctl hw.cputype == CPU_TYPE_ARM64, the correct value is unavailable
|
|
205
|
+
* from Apple, but we can hard-code it here to a plausible value. */
|
|
206
|
+
cpuspeed = 2400000000U;
|
|
194
207
|
|
|
195
208
|
if (host_processor_info(mach_host_self(), PROCESSOR_CPU_LOAD_INFO, &numcpus,
|
|
196
209
|
(processor_info_array_t*)&info,
|
|
197
210
|
&msg_type) != KERN_SUCCESS) {
|
|
198
|
-
return
|
|
211
|
+
return UV_EINVAL; /* FIXME(bnoordhuis) Translate error. */
|
|
199
212
|
}
|
|
200
213
|
|
|
201
214
|
*cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos));
|
|
202
215
|
if (!(*cpu_infos)) {
|
|
203
216
|
vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type);
|
|
204
|
-
return
|
|
217
|
+
return UV_ENOMEM;
|
|
205
218
|
}
|
|
206
219
|
|
|
207
220
|
*count = numcpus;
|
|
@@ -216,120 +229,9 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
|
|
|
216
229
|
cpu_info->cpu_times.irq = 0;
|
|
217
230
|
|
|
218
231
|
cpu_info->model = uv__strdup(model);
|
|
219
|
-
cpu_info->speed = cpuspeed/1000000;
|
|
232
|
+
cpu_info->speed = (int)(cpuspeed / 1000000);
|
|
220
233
|
}
|
|
221
234
|
vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type);
|
|
222
235
|
|
|
223
236
|
return 0;
|
|
224
237
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
|
|
228
|
-
int i;
|
|
229
|
-
|
|
230
|
-
for (i = 0; i < count; i++) {
|
|
231
|
-
uv__free(cpu_infos[i].model);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
uv__free(cpu_infos);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
|
|
239
|
-
struct ifaddrs *addrs, *ent;
|
|
240
|
-
uv_interface_address_t* address;
|
|
241
|
-
int i;
|
|
242
|
-
struct sockaddr_dl *sa_addr;
|
|
243
|
-
|
|
244
|
-
if (getifaddrs(&addrs))
|
|
245
|
-
return -errno;
|
|
246
|
-
|
|
247
|
-
*count = 0;
|
|
248
|
-
|
|
249
|
-
/* Count the number of interfaces */
|
|
250
|
-
for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
|
|
251
|
-
if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
|
|
252
|
-
(ent->ifa_addr == NULL) ||
|
|
253
|
-
(ent->ifa_addr->sa_family == AF_LINK)) {
|
|
254
|
-
continue;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
(*count)++;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
*addresses = uv__malloc(*count * sizeof(**addresses));
|
|
261
|
-
if (!(*addresses)) {
|
|
262
|
-
freeifaddrs(addrs);
|
|
263
|
-
return -ENOMEM;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
address = *addresses;
|
|
267
|
-
|
|
268
|
-
for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
|
|
269
|
-
if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
|
|
270
|
-
continue;
|
|
271
|
-
|
|
272
|
-
if (ent->ifa_addr == NULL)
|
|
273
|
-
continue;
|
|
274
|
-
|
|
275
|
-
/*
|
|
276
|
-
* On Mac OS X getifaddrs returns information related to Mac Addresses for
|
|
277
|
-
* various devices, such as firewire, etc. These are not relevant here.
|
|
278
|
-
*/
|
|
279
|
-
if (ent->ifa_addr->sa_family == AF_LINK)
|
|
280
|
-
continue;
|
|
281
|
-
|
|
282
|
-
address->name = uv__strdup(ent->ifa_name);
|
|
283
|
-
|
|
284
|
-
if (ent->ifa_addr->sa_family == AF_INET6) {
|
|
285
|
-
address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr);
|
|
286
|
-
} else {
|
|
287
|
-
address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
if (ent->ifa_netmask->sa_family == AF_INET6) {
|
|
291
|
-
address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask);
|
|
292
|
-
} else {
|
|
293
|
-
address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK);
|
|
297
|
-
|
|
298
|
-
address++;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/* Fill in physical addresses for each interface */
|
|
302
|
-
for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
|
|
303
|
-
if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
|
|
304
|
-
(ent->ifa_addr == NULL) ||
|
|
305
|
-
(ent->ifa_addr->sa_family != AF_LINK)) {
|
|
306
|
-
continue;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
address = *addresses;
|
|
310
|
-
|
|
311
|
-
for (i = 0; i < (*count); i++) {
|
|
312
|
-
if (strcmp(address->name, ent->ifa_name) == 0) {
|
|
313
|
-
sa_addr = (struct sockaddr_dl*)(ent->ifa_addr);
|
|
314
|
-
memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr));
|
|
315
|
-
}
|
|
316
|
-
address++;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
freeifaddrs(addrs);
|
|
321
|
-
|
|
322
|
-
return 0;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
void uv_free_interface_addresses(uv_interface_address_t* addresses,
|
|
327
|
-
int count) {
|
|
328
|
-
int i;
|
|
329
|
-
|
|
330
|
-
for (i = 0; i < count; i++) {
|
|
331
|
-
uv__free(addresses[i].name);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
uv__free(addresses);
|
|
335
|
-
}
|