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,536 @@
|
|
|
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
|
+
|
|
23
|
+
#include "os390-syscalls.h"
|
|
24
|
+
#include <errno.h>
|
|
25
|
+
#include <stdlib.h>
|
|
26
|
+
#include <search.h>
|
|
27
|
+
#include <termios.h>
|
|
28
|
+
#include <sys/msg.h>
|
|
29
|
+
|
|
30
|
+
static struct uv__queue global_epoll_queue;
|
|
31
|
+
static uv_mutex_t global_epoll_lock;
|
|
32
|
+
static uv_once_t once = UV_ONCE_INIT;
|
|
33
|
+
|
|
34
|
+
int scandir(const char* maindir, struct dirent*** namelist,
|
|
35
|
+
int (*filter)(const struct dirent*),
|
|
36
|
+
int (*compar)(const struct dirent**,
|
|
37
|
+
const struct dirent **)) {
|
|
38
|
+
struct dirent** nl;
|
|
39
|
+
struct dirent** nl_copy;
|
|
40
|
+
struct dirent* dirent;
|
|
41
|
+
unsigned count;
|
|
42
|
+
size_t allocated;
|
|
43
|
+
DIR* mdir;
|
|
44
|
+
|
|
45
|
+
nl = NULL;
|
|
46
|
+
count = 0;
|
|
47
|
+
allocated = 0;
|
|
48
|
+
mdir = opendir(maindir);
|
|
49
|
+
if (!mdir)
|
|
50
|
+
return -1;
|
|
51
|
+
|
|
52
|
+
for (;;) {
|
|
53
|
+
dirent = readdir(mdir);
|
|
54
|
+
if (!dirent)
|
|
55
|
+
break;
|
|
56
|
+
if (!filter || filter(dirent)) {
|
|
57
|
+
struct dirent* copy;
|
|
58
|
+
copy = uv__malloc(sizeof(*copy));
|
|
59
|
+
if (!copy)
|
|
60
|
+
goto error;
|
|
61
|
+
memcpy(copy, dirent, sizeof(*copy));
|
|
62
|
+
|
|
63
|
+
nl_copy = uv__realloc(nl, sizeof(*copy) * (count + 1));
|
|
64
|
+
if (nl_copy == NULL) {
|
|
65
|
+
uv__free(copy);
|
|
66
|
+
goto error;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
nl = nl_copy;
|
|
70
|
+
nl[count++] = copy;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
qsort(nl, count, sizeof(struct dirent *),
|
|
75
|
+
(int (*)(const void *, const void *)) compar);
|
|
76
|
+
|
|
77
|
+
closedir(mdir);
|
|
78
|
+
|
|
79
|
+
*namelist = nl;
|
|
80
|
+
return count;
|
|
81
|
+
|
|
82
|
+
error:
|
|
83
|
+
while (count > 0) {
|
|
84
|
+
dirent = nl[--count];
|
|
85
|
+
uv__free(dirent);
|
|
86
|
+
}
|
|
87
|
+
uv__free(nl);
|
|
88
|
+
closedir(mdir);
|
|
89
|
+
errno = ENOMEM;
|
|
90
|
+
return -1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
static unsigned int next_power_of_two(unsigned int val) {
|
|
95
|
+
val -= 1;
|
|
96
|
+
val |= val >> 1;
|
|
97
|
+
val |= val >> 2;
|
|
98
|
+
val |= val >> 4;
|
|
99
|
+
val |= val >> 8;
|
|
100
|
+
val |= val >> 16;
|
|
101
|
+
val += 1;
|
|
102
|
+
return val;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
static void maybe_resize(uv__os390_epoll* lst, unsigned int len) {
|
|
107
|
+
unsigned int newsize;
|
|
108
|
+
unsigned int i;
|
|
109
|
+
struct pollfd* newlst;
|
|
110
|
+
struct pollfd event;
|
|
111
|
+
|
|
112
|
+
if (len <= lst->size)
|
|
113
|
+
return;
|
|
114
|
+
|
|
115
|
+
if (lst->size == 0)
|
|
116
|
+
event.fd = -1;
|
|
117
|
+
else {
|
|
118
|
+
/* Extract the message queue at the end. */
|
|
119
|
+
event = lst->items[lst->size - 1];
|
|
120
|
+
lst->items[lst->size - 1].fd = -1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
newsize = next_power_of_two(len);
|
|
124
|
+
newlst = uv__reallocf(lst->items, newsize * sizeof(lst->items[0]));
|
|
125
|
+
|
|
126
|
+
if (newlst == NULL)
|
|
127
|
+
abort();
|
|
128
|
+
for (i = lst->size; i < newsize; ++i)
|
|
129
|
+
newlst[i].fd = -1;
|
|
130
|
+
|
|
131
|
+
/* Restore the message queue at the end */
|
|
132
|
+
newlst[newsize - 1] = event;
|
|
133
|
+
|
|
134
|
+
lst->items = newlst;
|
|
135
|
+
lst->size = newsize;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
void uv__os390_cleanup(void) {
|
|
140
|
+
msgctl(uv_backend_fd(uv_default_loop()), IPC_RMID, NULL);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
static void init_message_queue(uv__os390_epoll* lst) {
|
|
145
|
+
struct {
|
|
146
|
+
long int header;
|
|
147
|
+
char body;
|
|
148
|
+
} msg;
|
|
149
|
+
|
|
150
|
+
/* initialize message queue */
|
|
151
|
+
lst->msg_queue = msgget(IPC_PRIVATE, 0600 | IPC_CREAT);
|
|
152
|
+
if (lst->msg_queue == -1)
|
|
153
|
+
abort();
|
|
154
|
+
|
|
155
|
+
/*
|
|
156
|
+
On z/OS, the message queue will be affiliated with the process only
|
|
157
|
+
when a send is performed on it. Once this is done, the system
|
|
158
|
+
can be queried for all message queues belonging to our process id.
|
|
159
|
+
*/
|
|
160
|
+
msg.header = 1;
|
|
161
|
+
if (msgsnd(lst->msg_queue, &msg, sizeof(msg.body), 0) != 0)
|
|
162
|
+
abort();
|
|
163
|
+
|
|
164
|
+
/* Clean up the dummy message sent above */
|
|
165
|
+
if (msgrcv(lst->msg_queue, &msg, sizeof(msg.body), 0, 0) != sizeof(msg.body))
|
|
166
|
+
abort();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
static void before_fork(void) {
|
|
171
|
+
uv_mutex_lock(&global_epoll_lock);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
static void after_fork(void) {
|
|
176
|
+
uv_mutex_unlock(&global_epoll_lock);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
static void child_fork(void) {
|
|
181
|
+
struct uv__queue* q;
|
|
182
|
+
uv_once_t child_once = UV_ONCE_INIT;
|
|
183
|
+
|
|
184
|
+
/* reset once */
|
|
185
|
+
memcpy(&once, &child_once, sizeof(child_once));
|
|
186
|
+
|
|
187
|
+
/* reset epoll list */
|
|
188
|
+
while (!uv__queue_empty(&global_epoll_queue)) {
|
|
189
|
+
uv__os390_epoll* lst;
|
|
190
|
+
q = uv__queue_head(&global_epoll_queue);
|
|
191
|
+
uv__queue_remove(q);
|
|
192
|
+
lst = uv__queue_data(q, uv__os390_epoll, member);
|
|
193
|
+
uv__free(lst->items);
|
|
194
|
+
lst->items = NULL;
|
|
195
|
+
lst->size = 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
uv_mutex_unlock(&global_epoll_lock);
|
|
199
|
+
uv_mutex_destroy(&global_epoll_lock);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
static void epoll_init(void) {
|
|
204
|
+
uv__queue_init(&global_epoll_queue);
|
|
205
|
+
if (uv_mutex_init(&global_epoll_lock))
|
|
206
|
+
abort();
|
|
207
|
+
|
|
208
|
+
if (pthread_atfork(&before_fork, &after_fork, &child_fork))
|
|
209
|
+
abort();
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
uv__os390_epoll* epoll_create1(int flags) {
|
|
214
|
+
uv__os390_epoll* lst;
|
|
215
|
+
|
|
216
|
+
lst = uv__malloc(sizeof(*lst));
|
|
217
|
+
if (lst != NULL) {
|
|
218
|
+
/* initialize list */
|
|
219
|
+
lst->size = 0;
|
|
220
|
+
lst->items = NULL;
|
|
221
|
+
init_message_queue(lst);
|
|
222
|
+
maybe_resize(lst, 1);
|
|
223
|
+
lst->items[lst->size - 1].fd = lst->msg_queue;
|
|
224
|
+
lst->items[lst->size - 1].events = POLLIN;
|
|
225
|
+
lst->items[lst->size - 1].revents = 0;
|
|
226
|
+
uv_once(&once, epoll_init);
|
|
227
|
+
uv_mutex_lock(&global_epoll_lock);
|
|
228
|
+
uv__queue_insert_tail(&global_epoll_queue, &lst->member);
|
|
229
|
+
uv_mutex_unlock(&global_epoll_lock);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return lst;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
int epoll_ctl(uv__os390_epoll* lst,
|
|
237
|
+
int op,
|
|
238
|
+
int fd,
|
|
239
|
+
struct epoll_event *event) {
|
|
240
|
+
uv_mutex_lock(&global_epoll_lock);
|
|
241
|
+
|
|
242
|
+
if (op == EPOLL_CTL_DEL) {
|
|
243
|
+
if (fd >= lst->size || lst->items[fd].fd == -1) {
|
|
244
|
+
uv_mutex_unlock(&global_epoll_lock);
|
|
245
|
+
errno = ENOENT;
|
|
246
|
+
return -1;
|
|
247
|
+
}
|
|
248
|
+
lst->items[fd].fd = -1;
|
|
249
|
+
} else if (op == EPOLL_CTL_ADD) {
|
|
250
|
+
|
|
251
|
+
/* Resizing to 'fd + 1' would expand the list to contain at least
|
|
252
|
+
* 'fd'. But we need to guarantee that the last index on the list
|
|
253
|
+
* is reserved for the message queue. So specify 'fd + 2' instead.
|
|
254
|
+
*/
|
|
255
|
+
maybe_resize(lst, fd + 2);
|
|
256
|
+
if (lst->items[fd].fd != -1) {
|
|
257
|
+
uv_mutex_unlock(&global_epoll_lock);
|
|
258
|
+
errno = EEXIST;
|
|
259
|
+
return -1;
|
|
260
|
+
}
|
|
261
|
+
lst->items[fd].fd = fd;
|
|
262
|
+
lst->items[fd].events = event->events;
|
|
263
|
+
lst->items[fd].revents = 0;
|
|
264
|
+
} else if (op == EPOLL_CTL_MOD) {
|
|
265
|
+
if (fd >= lst->size - 1 || lst->items[fd].fd == -1) {
|
|
266
|
+
uv_mutex_unlock(&global_epoll_lock);
|
|
267
|
+
errno = ENOENT;
|
|
268
|
+
return -1;
|
|
269
|
+
}
|
|
270
|
+
lst->items[fd].events = event->events;
|
|
271
|
+
lst->items[fd].revents = 0;
|
|
272
|
+
} else
|
|
273
|
+
abort();
|
|
274
|
+
|
|
275
|
+
uv_mutex_unlock(&global_epoll_lock);
|
|
276
|
+
return 0;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
#define EP_MAX_PFDS (ULONG_MAX / sizeof(struct pollfd))
|
|
280
|
+
#define EP_MAX_EVENTS (INT_MAX / sizeof(struct epoll_event))
|
|
281
|
+
|
|
282
|
+
int epoll_wait(uv__os390_epoll* lst, struct epoll_event* events,
|
|
283
|
+
int maxevents, int timeout) {
|
|
284
|
+
nmsgsfds_t size;
|
|
285
|
+
struct pollfd* pfds;
|
|
286
|
+
int pollret;
|
|
287
|
+
int pollfdret;
|
|
288
|
+
int pollmsgret;
|
|
289
|
+
int reventcount;
|
|
290
|
+
int nevents;
|
|
291
|
+
struct pollfd msg_fd;
|
|
292
|
+
int i;
|
|
293
|
+
|
|
294
|
+
if (!lst || !lst->items || !events) {
|
|
295
|
+
errno = EFAULT;
|
|
296
|
+
return -1;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (lst->size > EP_MAX_PFDS) {
|
|
300
|
+
errno = EINVAL;
|
|
301
|
+
return -1;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (maxevents <= 0 || maxevents > EP_MAX_EVENTS) {
|
|
305
|
+
errno = EINVAL;
|
|
306
|
+
return -1;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
assert(lst->size > 0);
|
|
310
|
+
_SET_FDS_MSGS(size, 1, lst->size - 1);
|
|
311
|
+
pfds = lst->items;
|
|
312
|
+
pollret = poll(pfds, size, timeout);
|
|
313
|
+
if (pollret <= 0)
|
|
314
|
+
return pollret;
|
|
315
|
+
|
|
316
|
+
pollfdret = _NFDS(pollret);
|
|
317
|
+
pollmsgret = _NMSGS(pollret);
|
|
318
|
+
|
|
319
|
+
reventcount = 0;
|
|
320
|
+
nevents = 0;
|
|
321
|
+
msg_fd = pfds[lst->size - 1]; /* message queue is always last entry */
|
|
322
|
+
maxevents = maxevents - pollmsgret; /* allow spot for message queue */
|
|
323
|
+
for (i = 0;
|
|
324
|
+
i < lst->size - 1 &&
|
|
325
|
+
nevents < maxevents &&
|
|
326
|
+
reventcount < pollfdret; ++i) {
|
|
327
|
+
struct epoll_event ev;
|
|
328
|
+
struct pollfd* pfd;
|
|
329
|
+
|
|
330
|
+
pfd = &pfds[i];
|
|
331
|
+
if (pfd->fd == -1 || pfd->revents == 0)
|
|
332
|
+
continue;
|
|
333
|
+
|
|
334
|
+
ev.fd = pfd->fd;
|
|
335
|
+
ev.events = pfd->revents;
|
|
336
|
+
ev.is_msg = 0;
|
|
337
|
+
|
|
338
|
+
reventcount++;
|
|
339
|
+
events[nevents++] = ev;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
if (pollmsgret > 0 && msg_fd.revents != 0 && msg_fd.fd != -1) {
|
|
343
|
+
struct epoll_event ev;
|
|
344
|
+
ev.fd = msg_fd.fd;
|
|
345
|
+
ev.events = msg_fd.revents;
|
|
346
|
+
ev.is_msg = 1;
|
|
347
|
+
events[nevents++] = ev;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
return nevents;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
int epoll_file_close(int fd) {
|
|
355
|
+
struct uv__queue* q;
|
|
356
|
+
|
|
357
|
+
uv_once(&once, epoll_init);
|
|
358
|
+
uv_mutex_lock(&global_epoll_lock);
|
|
359
|
+
uv__queue_foreach(q, &global_epoll_queue) {
|
|
360
|
+
uv__os390_epoll* lst;
|
|
361
|
+
|
|
362
|
+
lst = uv__queue_data(q, uv__os390_epoll, member);
|
|
363
|
+
if (fd < lst->size && lst->items != NULL && lst->items[fd].fd != -1)
|
|
364
|
+
lst->items[fd].fd = -1;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
uv_mutex_unlock(&global_epoll_lock);
|
|
368
|
+
return 0;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
void epoll_queue_close(uv__os390_epoll* lst) {
|
|
372
|
+
/* Remove epoll instance from global queue */
|
|
373
|
+
uv_mutex_lock(&global_epoll_lock);
|
|
374
|
+
uv__queue_remove(&lst->member);
|
|
375
|
+
uv_mutex_unlock(&global_epoll_lock);
|
|
376
|
+
|
|
377
|
+
/* Free resources */
|
|
378
|
+
msgctl(lst->msg_queue, IPC_RMID, NULL);
|
|
379
|
+
lst->msg_queue = -1;
|
|
380
|
+
uv__free(lst->items);
|
|
381
|
+
lst->items = NULL;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
char* mkdtemp(char* path) {
|
|
386
|
+
static const char* tempchars =
|
|
387
|
+
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
388
|
+
static const size_t num_chars = 62;
|
|
389
|
+
static const size_t num_x = 6;
|
|
390
|
+
char *ep, *cp;
|
|
391
|
+
unsigned int tries, i;
|
|
392
|
+
size_t len;
|
|
393
|
+
uint64_t v;
|
|
394
|
+
int fd;
|
|
395
|
+
int retval;
|
|
396
|
+
int saved_errno;
|
|
397
|
+
|
|
398
|
+
len = strlen(path);
|
|
399
|
+
ep = path + len;
|
|
400
|
+
if (len < num_x || strncmp(ep - num_x, "XXXXXX", num_x)) {
|
|
401
|
+
errno = EINVAL;
|
|
402
|
+
return NULL;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
fd = open("/dev/urandom", O_RDONLY);
|
|
406
|
+
if (fd == -1)
|
|
407
|
+
return NULL;
|
|
408
|
+
|
|
409
|
+
tries = TMP_MAX;
|
|
410
|
+
retval = -1;
|
|
411
|
+
do {
|
|
412
|
+
if (read(fd, &v, sizeof(v)) != sizeof(v))
|
|
413
|
+
break;
|
|
414
|
+
|
|
415
|
+
cp = ep - num_x;
|
|
416
|
+
for (i = 0; i < num_x; i++) {
|
|
417
|
+
*cp++ = tempchars[v % num_chars];
|
|
418
|
+
v /= num_chars;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
if (mkdir(path, S_IRWXU) == 0) {
|
|
422
|
+
retval = 0;
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
else if (errno != EEXIST)
|
|
426
|
+
break;
|
|
427
|
+
} while (--tries);
|
|
428
|
+
|
|
429
|
+
saved_errno = errno;
|
|
430
|
+
uv__close(fd);
|
|
431
|
+
if (tries == 0) {
|
|
432
|
+
errno = EEXIST;
|
|
433
|
+
return NULL;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
if (retval == -1) {
|
|
437
|
+
errno = saved_errno;
|
|
438
|
+
return NULL;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
return path;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
ssize_t os390_readlink(const char* path, char* buf, size_t len) {
|
|
446
|
+
ssize_t rlen;
|
|
447
|
+
ssize_t vlen;
|
|
448
|
+
ssize_t plen;
|
|
449
|
+
char* delimiter;
|
|
450
|
+
char old_delim;
|
|
451
|
+
char* tmpbuf;
|
|
452
|
+
char realpathstr[PATH_MAX + 1];
|
|
453
|
+
|
|
454
|
+
tmpbuf = uv__malloc(len + 1);
|
|
455
|
+
if (tmpbuf == NULL) {
|
|
456
|
+
errno = ENOMEM;
|
|
457
|
+
return -1;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
rlen = readlink(path, tmpbuf, len);
|
|
461
|
+
if (rlen < 0) {
|
|
462
|
+
uv__free(tmpbuf);
|
|
463
|
+
return rlen;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (rlen < 3 || strncmp("/$", tmpbuf, 2) != 0) {
|
|
467
|
+
/* Straightforward readlink. */
|
|
468
|
+
memcpy(buf, tmpbuf, rlen);
|
|
469
|
+
uv__free(tmpbuf);
|
|
470
|
+
return rlen;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/*
|
|
474
|
+
* There is a parmlib variable at the beginning
|
|
475
|
+
* which needs interpretation.
|
|
476
|
+
*/
|
|
477
|
+
tmpbuf[rlen] = '\0';
|
|
478
|
+
delimiter = strchr(tmpbuf + 2, '/');
|
|
479
|
+
if (delimiter == NULL)
|
|
480
|
+
/* No slash at the end */
|
|
481
|
+
delimiter = strchr(tmpbuf + 2, '\0');
|
|
482
|
+
|
|
483
|
+
/* Read real path of the variable. */
|
|
484
|
+
old_delim = *delimiter;
|
|
485
|
+
*delimiter = '\0';
|
|
486
|
+
if (realpath(tmpbuf, realpathstr) == NULL) {
|
|
487
|
+
uv__free(tmpbuf);
|
|
488
|
+
return -1;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/* realpathstr is not guaranteed to end with null byte.*/
|
|
492
|
+
realpathstr[PATH_MAX] = '\0';
|
|
493
|
+
|
|
494
|
+
/* Reset the delimiter and fill up the buffer. */
|
|
495
|
+
*delimiter = old_delim;
|
|
496
|
+
plen = strlen(delimiter);
|
|
497
|
+
vlen = strlen(realpathstr);
|
|
498
|
+
rlen = plen + vlen;
|
|
499
|
+
if (rlen > len) {
|
|
500
|
+
uv__free(tmpbuf);
|
|
501
|
+
errno = ENAMETOOLONG;
|
|
502
|
+
return -1;
|
|
503
|
+
}
|
|
504
|
+
memcpy(buf, realpathstr, vlen);
|
|
505
|
+
memcpy(buf + vlen, delimiter, plen);
|
|
506
|
+
|
|
507
|
+
/* Done using temporary buffer. */
|
|
508
|
+
uv__free(tmpbuf);
|
|
509
|
+
|
|
510
|
+
return rlen;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
int sem_init(UV_PLATFORM_SEM_T* semid, int pshared, unsigned int value) {
|
|
515
|
+
UNREACHABLE();
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
int sem_destroy(UV_PLATFORM_SEM_T* semid) {
|
|
520
|
+
UNREACHABLE();
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
int sem_post(UV_PLATFORM_SEM_T* semid) {
|
|
525
|
+
UNREACHABLE();
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
int sem_trywait(UV_PLATFORM_SEM_T* semid) {
|
|
530
|
+
UNREACHABLE();
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
int sem_wait(UV_PLATFORM_SEM_T* semid) {
|
|
535
|
+
UNREACHABLE();
|
|
536
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
|
|
23
|
+
#ifndef UV_OS390_SYSCALL_H_
|
|
24
|
+
#define UV_OS390_SYSCALL_H_
|
|
25
|
+
|
|
26
|
+
#include "uv.h"
|
|
27
|
+
#include "internal.h"
|
|
28
|
+
#include <dirent.h>
|
|
29
|
+
#include <poll.h>
|
|
30
|
+
#include <pthread.h>
|
|
31
|
+
#include "zos-base.h"
|
|
32
|
+
|
|
33
|
+
#define EPOLL_CTL_ADD 1
|
|
34
|
+
#define EPOLL_CTL_DEL 2
|
|
35
|
+
#define EPOLL_CTL_MOD 3
|
|
36
|
+
#define MAX_EPOLL_INSTANCES 256
|
|
37
|
+
#define MAX_ITEMS_PER_EPOLL 1024
|
|
38
|
+
|
|
39
|
+
#define UV__O_CLOEXEC 0x80000
|
|
40
|
+
|
|
41
|
+
struct epoll_event {
|
|
42
|
+
int events;
|
|
43
|
+
int fd;
|
|
44
|
+
int is_msg;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
typedef struct {
|
|
48
|
+
struct uv__queue member;
|
|
49
|
+
struct pollfd* items;
|
|
50
|
+
unsigned long size;
|
|
51
|
+
int msg_queue;
|
|
52
|
+
} uv__os390_epoll;
|
|
53
|
+
|
|
54
|
+
/* epoll api */
|
|
55
|
+
uv__os390_epoll* epoll_create1(int flags);
|
|
56
|
+
int epoll_ctl(uv__os390_epoll* ep, int op, int fd, struct epoll_event *event);
|
|
57
|
+
int epoll_wait(uv__os390_epoll* ep, struct epoll_event *events, int maxevents, int timeout);
|
|
58
|
+
int epoll_file_close(int fd);
|
|
59
|
+
|
|
60
|
+
/* utility functions */
|
|
61
|
+
int scandir(const char* maindir, struct dirent*** namelist,
|
|
62
|
+
int (*filter)(const struct dirent *),
|
|
63
|
+
int (*compar)(const struct dirent **,
|
|
64
|
+
const struct dirent **));
|
|
65
|
+
char *mkdtemp(char* path);
|
|
66
|
+
ssize_t os390_readlink(const char* path, char* buf, size_t len);
|
|
67
|
+
size_t strnlen(const char* str, size_t maxlen);
|
|
68
|
+
int sem_init(UV_PLATFORM_SEM_T* semid, int pshared, unsigned int value);
|
|
69
|
+
int sem_destroy(UV_PLATFORM_SEM_T* semid);
|
|
70
|
+
int sem_post(UV_PLATFORM_SEM_T* semid);
|
|
71
|
+
int sem_trywait(UV_PLATFORM_SEM_T* semid);
|
|
72
|
+
int sem_wait(UV_PLATFORM_SEM_T* semid);
|
|
73
|
+
void uv__os390_cleanup(void);
|
|
74
|
+
|
|
75
|
+
#endif /* UV_OS390_SYSCALL_H_ */
|