passenger 6.0.22 → 6.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +59 -1
- data/Rakefile +13 -2
- data/bin/passenger-install-apache2-module +5 -0
- data/bin/passenger-install-nginx-module +18 -2
- data/build/apache2.rb +1 -1
- data/build/basics.rb +10 -4
- data/build/cxx_tests.rb +18 -7
- data/build/support/cxx_dependency_map.rb +40 -6
- data/build/test_basics.rb +24 -13
- data/package.json +1 -1
- data/passenger.gemspec +4 -2
- data/resources/templates/standalone/server.erb +1 -0
- data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +8 -0
- data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +10 -2
- data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +8 -0
- data/src/agent/Core/ApplicationPool/Group/Miscellaneous.cpp +9 -0
- data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +9 -0
- data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +63 -50
- data/src/agent/Core/ApplicationPool/Group/SessionManagement.cpp +19 -9
- data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +8 -0
- data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +9 -1
- data/src/agent/Core/ApplicationPool/Group/Verification.cpp +8 -0
- data/src/agent/Core/ApplicationPool/Group.h +15 -5
- data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +5 -0
- data/src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +5 -0
- data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +5 -0
- data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +5 -0
- data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +5 -0
- data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +5 -0
- data/src/agent/Core/ApplicationPool/Pool/ProcessUtils.cpp +5 -0
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +11 -4
- data/src/agent/Core/ApplicationPool/Pool.h +0 -2
- data/src/agent/Core/ApplicationPool/Process.h +22 -6
- data/src/agent/Core/ApplicationPool/Session.h +6 -1
- data/src/agent/Core/Config.h +8 -3
- data/src/agent/Core/Controller/CheckoutSession.cpp +24 -1
- data/src/agent/Core/Controller/Config.h +5 -1
- data/src/agent/Core/Controller.h +1 -0
- data/src/agent/Core/CoreMain.cpp +10 -17
- data/src/agent/Core/OptionParser.h +3 -0
- data/src/agent/Core/SpawningKit/ErrorRenderer.h +5 -0
- data/src/agent/Core/SpawningKit/Handshake/Prepare.h +1 -53
- data/src/agent/Core/SpawningKit/Handshake/Session.h +3 -0
- data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +5 -2
- data/src/agent/Core/SpawningKit/SmartSpawner.h +6 -2
- data/src/agent/Core/SpawningKit/Spawner.h +4 -0
- data/src/agent/Shared/Fundamentals/AbortHandler.cpp +88 -9
- data/src/agent/Shared/Fundamentals/AbortHandler.h +2 -0
- data/src/agent/Shared/Fundamentals/Initialization.cpp +9 -3
- data/src/agent/Shared/Fundamentals/Initialization.h +3 -3
- data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +6 -7
- data/src/agent/Watchdog/Config.h +2 -1
- data/src/agent/Watchdog/WatchdogMain.cpp +4 -7
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +5 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +15 -0
- data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +5 -3
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +5 -0
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +3 -0
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +13 -0
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +16 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +3 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +2 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +2 -1
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/cxx_supportlib/DataStructures/LString.h +4 -0
- data/src/cxx_supportlib/DataStructures/StringMap.h +0 -1
- data/src/cxx_supportlib/FileTools/PathManip.cpp +1 -1
- data/src/cxx_supportlib/SafeLibev.h +1 -3
- data/src/cxx_supportlib/ServerKit/Hooks.h +2 -2
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +0 -1
- data/src/cxx_supportlib/ServerKit/HttpServer.h +15 -10
- data/src/cxx_supportlib/ServerKit/Server.h +0 -6
- data/src/cxx_supportlib/Utils/AsyncSignalSafeUtils.h +2 -0
- data/src/cxx_supportlib/Utils/SpeedMeter.h +0 -3
- data/src/cxx_supportlib/oxt/implementation.cpp +11 -0
- data/src/cxx_supportlib/oxt/system_calls.cpp +10 -3
- data/src/cxx_supportlib/oxt/thread.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/as_tuple.hpp +35 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_immediate_executor.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/associator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +74 -68
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +11 -11
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_random_access_file.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +10 -10
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_readable_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_file.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_writable_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_allocator.hpp +88 -22
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_cancellation_slot.hpp +91 -22
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +105 -23
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_immediate_executor.hpp +90 -23
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffer_registration.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/cancel_after.hpp +303 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/cancel_at.hpp +296 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/impl/co_composed.hpp → co_composed.hpp} +208 -61
- data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +10 -201
- data/src/cxx_supportlib/vendor-modified/boost/asio/composed.hpp +415 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +214 -48
- data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +3 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/default_completion_token.hpp +91 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/deferred.hpp +9 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detached.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/detail/channel_message.hpp → detail/completion_message.hpp} +14 -16
- data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/detail/channel_payload.hpp → detail/completion_payload.hpp} +30 -32
- data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/detail/channel_handler.hpp → detail/completion_payload_handler.hpp} +15 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +26 -32
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +14 -118
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +36 -33
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +7 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +6 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +44 -35
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/initiation_base.hpp +64 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +0 -11
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +20 -16
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +23 -18
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/recycling_allocator.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_query_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timed_cancel_op.hpp +363 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +29 -51
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_channel.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_composed.hpp +2 -114
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_receive_op.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_functions.hpp +27 -19
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_op.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_service.hpp +17 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_promise_allocator.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/impl/channel_service.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/partial_promise.hpp +3 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +12 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/coro.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/parallel_group.hpp +38 -40
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/promise.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_coro.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_promise.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/immediate.hpp +144 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/append.hpp +14 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/as_tuple.hpp +45 -14
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/awaitable.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancel_after.hpp +270 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancel_at.hpp +270 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +8 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +60 -166
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/consign.hpp +14 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/detached.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/prepend.hpp +14 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +26 -177
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +16 -82
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +13 -286
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +55 -18
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +26 -185
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +16 -87
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_context_strand.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +12 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +127 -28
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +70 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +114 -36
- data/src/cxx_supportlib/vendor-modified/boost/asio/redirect_error.hpp +43 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/registered_buffer.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +10 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/this_coro.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/use_awaitable.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/uses_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +147 -35
- data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +74 -22
- data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +6 -0
- data/src/cxx_supportlib/vendor-modified/boost/assert/source_location.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/futex.hpp +42 -11
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +15 -37
- data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +151 -10
- data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +11 -9
- data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +611 -102
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +47 -47
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +25 -24
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocation_type.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_list.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_slist.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/construct_in_place.hpp +35 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +14 -14
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +55 -23
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/function_detector.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_container.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_contiguous_container.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_pair.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/multiallocation_chain.hpp +96 -10
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +19 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +17 -17
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common_alloc.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_resource.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +86 -52
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/version_type.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +145 -65
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +105 -22
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +30 -22
- data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +19 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +15 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +15 -15
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/monotonic_buffer_resource.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +31 -24
- data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +45 -43
- data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +45 -33
- data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +5 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +55 -47
- data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +222 -73
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/minstd_rand.hpp +58 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/core/empty_value.hpp +53 -5
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/pointer_in_range.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/span.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/type_name.hpp +7 -2
- data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +22 -34
- data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +141 -38
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algorithm.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hash.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +8 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +18 -18
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +22 -17
- data/src/cxx_supportlib/vendor-modified/boost/libs/random/src/random_device.cpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_begin.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/launder.hpp +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +9 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +6 -1
- data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/integral_wrapper.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/requires_cxx11.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/generic_category_message.hpp +13 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map.hpp +13 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map_fwd.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set.hpp +13 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set_fwd.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fca.hpp +22 -6
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/concurrent_table.hpp +38 -10
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/core.hpp +111 -2
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/cumulative_stats.hpp +177 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/hash_traits.hpp +33 -7
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map_fwd.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set_fwd.hpp +14 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +19 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map_fwd.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set_fwd.hpp +14 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/detail/minstd_rand.hpp +1 -43
- data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +8 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +12 -0
- data/src/nginx_module/Configuration.c +7 -2
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +6 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +15 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +14 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +3 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +4 -0
- data/src/ruby_native_extension/passenger_native_support.c +1 -0
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +5 -0
- data/src/ruby_supportlib/phusion_passenger/config/compile_nginx_engine_command.rb +6 -2
- data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +10 -0
- data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +12 -4
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +5 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +32 -5
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/gems.rb +10 -0
- data/src/ruby_supportlib/phusion_passenger/rack/handler.rb +73 -0
- data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +30 -56
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +5 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +0 -4
- data/src/ruby_supportlib/phusion_passenger/utils/json.rb +7 -198
- data/src/ruby_supportlib/phusion_passenger/utils/strscan.rb +67 -0
- data/src/ruby_supportlib/phusion_passenger/utils.rb +5 -15
- data/src/ruby_supportlib/phusion_passenger.rb +5 -5
- metadata +39 -10
@@ -29,13 +29,13 @@
|
|
29
29
|
#include <boost/cstdint.hpp>
|
30
30
|
#include <sys/types.h>
|
31
31
|
#include <sys/stat.h>
|
32
|
+
#include <sys/wait.h>
|
32
33
|
#include <sys/select.h>
|
33
34
|
#include <cstdio>
|
34
35
|
#include <cstdlib>
|
35
36
|
#include <cstddef>
|
36
37
|
#include <cstring>
|
37
38
|
#include <cerrno>
|
38
|
-
#include <cassert>
|
39
39
|
#include <fcntl.h>
|
40
40
|
#include <poll.h>
|
41
41
|
#include <unistd.h>
|
@@ -121,8 +121,6 @@ typedef void (*Callback)(AbortHandlerWorkingState &state, void *userData);
|
|
121
121
|
|
122
122
|
|
123
123
|
static AbortHandlerContext *ctx = NULL;
|
124
|
-
static const char digits[] = "0123456789";
|
125
|
-
static const char hex_chars[] = "0123456789abcdef";
|
126
124
|
|
127
125
|
|
128
126
|
static void
|
@@ -269,6 +267,65 @@ appendSignalReason(char *buf, const char *end, siginfo_t *info) {
|
|
269
267
|
return buf;
|
270
268
|
}
|
271
269
|
|
270
|
+
static bool
|
271
|
+
resumeOriginalProcess(AbortHandlerWorkingState &state) {
|
272
|
+
const char *end = state.messageBuf + sizeof(state.messageBuf);
|
273
|
+
char *pos = state.messageBuf;
|
274
|
+
pos = ASSU::appendData(pos, end, state.messagePrefix);
|
275
|
+
pos = ASSU::appendData(pos, end, " ] Triggering original signal handler");
|
276
|
+
pos = ASSU::appendData(pos, end, "\n");
|
277
|
+
write_nowarn(STDERR_FILENO, state.messageBuf, pos - state.messageBuf);
|
278
|
+
|
279
|
+
int e = kill(state.pid, SIGCONT);
|
280
|
+
if (e == -1) {
|
281
|
+
int e = errno;
|
282
|
+
pos = state.messageBuf;
|
283
|
+
pos = ASSU::appendData(pos, end, state.messagePrefix);
|
284
|
+
pos = ASSU::appendData(pos, end, " ] Could not resume original process: kill() failed: ");
|
285
|
+
pos = ASSU::appendData(pos, end, ASSU::limitedStrerror(e));
|
286
|
+
pos = ASSU::appendData(pos, end, " (errno=");
|
287
|
+
pos = ASSU::appendInteger<int, 10>(pos, end, e);
|
288
|
+
pos = ASSU::appendData(pos, end, ")\n");
|
289
|
+
write_nowarn(STDERR_FILENO, state.messageBuf, pos - state.messageBuf);
|
290
|
+
|
291
|
+
return false;
|
292
|
+
} {
|
293
|
+
return true;
|
294
|
+
}
|
295
|
+
}
|
296
|
+
|
297
|
+
static void
|
298
|
+
forceTerminateOriginalProcess(AbortHandlerWorkingState &state) {
|
299
|
+
const char *end = state.messageBuf + sizeof(state.messageBuf);
|
300
|
+
char *pos = state.messageBuf;
|
301
|
+
pos = ASSU::appendData(pos, end, state.messagePrefix);
|
302
|
+
pos = ASSU::appendData(pos, end, " ] Force terminating original process");
|
303
|
+
pos = ASSU::appendData(pos, end, "\n");
|
304
|
+
write_nowarn(STDERR_FILENO, state.messageBuf, pos - state.messageBuf);
|
305
|
+
|
306
|
+
int ret = kill(state.pid, SIGKILL);
|
307
|
+
if (ret == -1) {
|
308
|
+
int e = errno;
|
309
|
+
pos = state.messageBuf;
|
310
|
+
pos = ASSU::appendData(pos, end, state.messagePrefix);
|
311
|
+
pos = ASSU::appendData(pos, end, " ] Could not force terminate original process: kill() failed: ");
|
312
|
+
pos = ASSU::appendData(pos, end, ASSU::limitedStrerror(e));
|
313
|
+
pos = ASSU::appendData(pos, end, " (errno=");
|
314
|
+
pos = ASSU::appendInteger<int, 10>(pos, end, e);
|
315
|
+
pos = ASSU::appendData(pos, end, ")\n");
|
316
|
+
write_nowarn(STDERR_FILENO, state.messageBuf, pos - state.messageBuf);
|
317
|
+
}
|
318
|
+
}
|
319
|
+
|
320
|
+
static void
|
321
|
+
resumeOrForceTerminateOriginalProcess(AbortHandlerWorkingState &state) {
|
322
|
+
if (ctx->config->forceTerminateProcess) {
|
323
|
+
forceTerminateOriginalProcess(state);
|
324
|
+
} else if (!resumeOriginalProcess(state)) {
|
325
|
+
forceTerminateOriginalProcess(state);
|
326
|
+
}
|
327
|
+
}
|
328
|
+
|
272
329
|
static int
|
273
330
|
runInSubprocessWithTimeLimit(AbortHandlerWorkingState &state, Callback callback, void *userData, int timeLimit) {
|
274
331
|
char *pos;
|
@@ -633,11 +690,25 @@ dumpWithCrashWatch(AbortHandlerWorkingState &state) {
|
|
633
690
|
close(p[0]);
|
634
691
|
backtrace_symbols_fd(backtraceStore, frames, p[1]);
|
635
692
|
close(p[1]);
|
636
|
-
|
693
|
+
|
694
|
+
int ret = waitpid(pid, &status, 0);
|
695
|
+
if (ret == -1 || status != 0) {
|
696
|
+
int e = errno;
|
637
697
|
pos = state.messageBuf;
|
638
698
|
pos = ASSU::appendData(pos, end, "ERROR: cannot execute '");
|
639
699
|
pos = ASSU::appendData(pos, end, ctx->backtraceSanitizerCommand);
|
640
|
-
pos = ASSU::appendData(pos, end, "' for sanitizing the backtrace
|
700
|
+
pos = ASSU::appendData(pos, end, "' for sanitizing the backtrace (");
|
701
|
+
if (ret == -1) {
|
702
|
+
pos = ASSU::appendData(pos, end, "waitpid() failed, errno=");
|
703
|
+
pos = ASSU::appendInteger<int, 10>(pos, end, e);
|
704
|
+
} else if (WIFSIGNALED(status)) {
|
705
|
+
pos = ASSU::appendData(pos, end, "exited with signal ");
|
706
|
+
pos = ASSU::appendInteger<int, 10>(pos, end, WTERMSIG(status));
|
707
|
+
} else {
|
708
|
+
pos = ASSU::appendData(pos, end, "exit status ");
|
709
|
+
pos = ASSU::appendInteger<int, 10>(pos, end, WEXITSTATUS(status));
|
710
|
+
}
|
711
|
+
pos = ASSU::appendData(pos, end, "), writing to stderr directly...\n");
|
641
712
|
write_nowarn(STDERR_FILENO, state.messageBuf, pos - state.messageBuf);
|
642
713
|
backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO);
|
643
714
|
}
|
@@ -1083,19 +1154,19 @@ abortHandler(int signo, siginfo_t *info, void *_unused) {
|
|
1083
1154
|
// with SIGPIPE as a result, so we ignore SIGPIPE again.
|
1084
1155
|
ignoreSigpipe();
|
1085
1156
|
dumpDiagnostics(state);
|
1086
|
-
|
1087
|
-
// We do it ourselves just to be sure.
|
1088
|
-
kill(state.pid, SIGCONT);
|
1157
|
+
resumeOrForceTerminateOriginalProcess(state);
|
1089
1158
|
_exit(0);
|
1090
1159
|
|
1091
1160
|
} else if (child == -1) {
|
1092
1161
|
int e = errno;
|
1093
1162
|
pos = state.messageBuf;
|
1094
1163
|
pos = ASSU::appendData(pos, end, state.messagePrefix);
|
1095
|
-
pos = ASSU::appendData(pos, end, "] Could not fork a child process for dumping diagnostics: fork() failed with errno=");
|
1164
|
+
pos = ASSU::appendData(pos, end, " ] Could not fork a child process for dumping diagnostics: fork() failed with errno=");
|
1096
1165
|
pos = ASSU::appendInteger<int, 10>(pos, end, e);
|
1097
1166
|
pos = ASSU::appendData(pos, end, "\n");
|
1098
1167
|
write_nowarn(STDERR_FILENO, state.messageBuf, pos - state.messageBuf);
|
1168
|
+
|
1169
|
+
resumeOrForceTerminateOriginalProcess(state);
|
1099
1170
|
_exit(1);
|
1100
1171
|
|
1101
1172
|
} else {
|
@@ -1112,6 +1183,8 @@ abortHandler(int signo, siginfo_t *info, void *_unused) {
|
|
1112
1183
|
pos = ASSU::appendData(pos, end, "\n");
|
1113
1184
|
write_nowarn(STDERR_FILENO, state.messageBuf, pos - state.messageBuf);
|
1114
1185
|
|
1186
|
+
resumeOrForceTerminateOriginalProcess(state);
|
1187
|
+
|
1115
1188
|
} else {
|
1116
1189
|
raise(SIGSTOP);
|
1117
1190
|
// Will continue after the child process has done its job.
|
@@ -1208,6 +1281,12 @@ abortHandlerConfigChanged() {
|
|
1208
1281
|
char *oldCrashWatchCommand = ctx->crashWatchCommand;
|
1209
1282
|
char *oldBacktraceSanitizerCommand = ctx->backtraceSanitizerCommand;
|
1210
1283
|
|
1284
|
+
if (config->origArgv == NULL) {
|
1285
|
+
fprintf(stderr, "AbortHandler requires config->origArgv!\n");
|
1286
|
+
fflush(stderr);
|
1287
|
+
abort();
|
1288
|
+
}
|
1289
|
+
|
1211
1290
|
if (config->resourceLocator != NULL) {
|
1212
1291
|
string path;
|
1213
1292
|
const ResourceLocator *locator = config->resourceLocator;
|
@@ -62,6 +62,7 @@ struct AbortHandlerConfig {
|
|
62
62
|
bool dumpWithCrashWatch;
|
63
63
|
bool beep;
|
64
64
|
bool stopProcess;
|
65
|
+
bool forceTerminateProcess;
|
65
66
|
ResourceLocator *resourceLocator;
|
66
67
|
DiagnosticsDumper diagnosticsDumpers[MAX_DIAGNOSTICS_DUMPERS];
|
67
68
|
|
@@ -72,6 +73,7 @@ struct AbortHandlerConfig {
|
|
72
73
|
dumpWithCrashWatch(false),
|
73
74
|
beep(false),
|
74
75
|
stopProcess(false),
|
76
|
+
forceTerminateProcess(false),
|
75
77
|
resourceLocator(NULL)
|
76
78
|
{ }
|
77
79
|
};
|
@@ -38,9 +38,8 @@
|
|
38
38
|
#include <vector>
|
39
39
|
|
40
40
|
#include <sys/types.h>
|
41
|
-
#include <stdlib.h>
|
41
|
+
#include <stdlib.h>
|
42
42
|
#include <unistd.h>
|
43
|
-
#include <signal.h>
|
44
43
|
#include <cstdio>
|
45
44
|
#include <cstdlib>
|
46
45
|
#include <cstring>
|
@@ -468,6 +467,7 @@ maybeInitializeAbortHandler() {
|
|
468
467
|
config->dumpWithCrashWatch = getEnvBool("PASSENGER_DUMP_WITH_CRASH_WATCH", true);
|
469
468
|
config->beep = getEnvBool("PASSENGER_BEEP_ON_ABORT");
|
470
469
|
config->stopProcess = getEnvBool("PASSENGER_STOP_ON_ABORT");
|
470
|
+
config->forceTerminateProcess = getEnvBool("PASSENGER_FORCE_TERMINATE_ON_ABORT");
|
471
471
|
|
472
472
|
installAbortHandler(config);
|
473
473
|
}
|
@@ -525,6 +525,12 @@ storeArgvCopy(int argc, char *argv[]) {
|
|
525
525
|
for (int i = 0; i < argc; i++) {
|
526
526
|
context->origArgv[i] = strdup(argv[i]);
|
527
527
|
}
|
528
|
+
|
529
|
+
if (abortHandlerInstalled()) {
|
530
|
+
// Let AbortHandler use the copy.
|
531
|
+
context->abortHandlerConfig.origArgv = context->origArgv;
|
532
|
+
abortHandlerConfigChanged();
|
533
|
+
}
|
528
534
|
}
|
529
535
|
|
530
536
|
static void
|
@@ -558,7 +564,7 @@ initializeAgent(int argc, char **argv[], const char *processName,
|
|
558
564
|
{
|
559
565
|
const char *seedStr;
|
560
566
|
|
561
|
-
context = new Context();
|
567
|
+
context = new Context(argc, *argv);
|
562
568
|
|
563
569
|
seedStr = getEnvString("PASSENGER_RANDOM_SEED");
|
564
570
|
if (seedStr == NULL) {
|
@@ -48,11 +48,11 @@ struct Context {
|
|
48
48
|
bool feedbackFdAvailable;
|
49
49
|
AbortHandlerConfig abortHandlerConfig;
|
50
50
|
|
51
|
-
Context()
|
51
|
+
Context(int argc, char *argv[])
|
52
52
|
: resourceLocator(NULL),
|
53
53
|
randomSeed(0),
|
54
|
-
origArgc(
|
55
|
-
origArgv(
|
54
|
+
origArgc(argc),
|
55
|
+
origArgv(argv),
|
56
56
|
feedbackFdAvailable(false)
|
57
57
|
{ }
|
58
58
|
};
|
@@ -36,8 +36,7 @@
|
|
36
36
|
#include <cstdlib>
|
37
37
|
#include <cstring>
|
38
38
|
#include <cerrno>
|
39
|
-
#include <
|
40
|
-
#include <stdexcept>
|
39
|
+
#include <exception>
|
41
40
|
#include <string>
|
42
41
|
#include <vector>
|
43
42
|
|
@@ -47,7 +46,7 @@
|
|
47
46
|
#include <sys/time.h>
|
48
47
|
#include <sys/resource.h>
|
49
48
|
#include <sys/stat.h>
|
50
|
-
#include <limits.h>
|
49
|
+
#include <limits.h> // IWYU pragma: keep (for PATH_MAX)
|
51
50
|
#include <unistd.h>
|
52
51
|
#include <pwd.h>
|
53
52
|
#include <grp.h>
|
@@ -218,8 +217,8 @@ dumpEnvvars(const string &workDir) {
|
|
218
217
|
NULL
|
219
218
|
};
|
220
219
|
SubprocessInfo info;
|
221
|
-
|
222
|
-
|
220
|
+
int fd = fileno(f);
|
221
|
+
runCommand(command, info, true, true, [=]() { reopenStdout(fd); });
|
223
222
|
fclose(f);
|
224
223
|
}
|
225
224
|
|
@@ -237,8 +236,8 @@ dumpUserInfo(const string &workDir) {
|
|
237
236
|
NULL
|
238
237
|
};
|
239
238
|
SubprocessInfo info;
|
240
|
-
|
241
|
-
|
239
|
+
int fd = fileno(f);
|
240
|
+
runCommand(command, info, true, true, [=]() { reopenStdout(fd); });
|
242
241
|
fclose(f);
|
243
242
|
}
|
244
243
|
|
data/src/agent/Watchdog/Config.h
CHANGED
@@ -104,6 +104,7 @@ using namespace std;
|
|
104
104
|
* default_abort_websockets_on_process_shutdown boolean - default(true)
|
105
105
|
* default_app_file_descriptor_ulimit unsigned integer - -
|
106
106
|
* default_bind_address string - default("127.0.0.1")
|
107
|
+
* default_custom_error_page string - default("")
|
107
108
|
* default_environment string - default("production")
|
108
109
|
* default_force_max_concurrent_requests_per_process integer - default(-1)
|
109
110
|
* default_friendly_error_pages string - default("auto")
|
@@ -154,7 +155,7 @@ using namespace std;
|
|
154
155
|
* security_update_checker_interval unsigned integer - default(86400)
|
155
156
|
* security_update_checker_proxy_url string - -
|
156
157
|
* security_update_checker_url string - default("https://securitycheck.phusionpassenger.com/v1/check.json")
|
157
|
-
* server_software string - default("Phusion_Passenger/6.0.
|
158
|
+
* server_software string - default("Phusion_Passenger/6.0.24")
|
158
159
|
* setsid boolean - default(false)
|
159
160
|
* show_version_in_header boolean - default(true)
|
160
161
|
* single_app_mode_app_root string - default,read_only
|
@@ -836,13 +836,10 @@ parseOptions(int argc, const char *argv[], ConfigKit::Store &config) {
|
|
836
836
|
}
|
837
837
|
}
|
838
838
|
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
ConfigKit::toString(errors) << "\n"
|
844
|
-
"Raw initial configuration: " << updates.toStyledString());
|
845
|
-
}
|
839
|
+
vector<ConfigKit::Error> errors;
|
840
|
+
if (!config.update(updates, errors)) {
|
841
|
+
P_ERROR("*** Error in options: " << ConfigKit::toString(errors));
|
842
|
+
std::exit(1);
|
846
843
|
}
|
847
844
|
}
|
848
845
|
|
@@ -142,6 +142,11 @@ extern "C" const command_rec passenger_commands[] = {
|
|
142
142
|
NULL,
|
143
143
|
RSRC_CONF,
|
144
144
|
"Set advanced Phusion Passenger(R) options."),
|
145
|
+
AP_INIT_TAKE1("PassengerCustomErrorPage",
|
146
|
+
(Take1Func) cmd_passenger_custom_error_page,
|
147
|
+
NULL,
|
148
|
+
RSRC_CONF | ACCESS_CONF,
|
149
|
+
"Path to html file to use for Passenger generated error pages."),
|
145
150
|
AP_INIT_TAKE1("PassengerDataBufferDir",
|
146
151
|
(Take1Func) cmd_passenger_data_buffer_dir,
|
147
152
|
NULL,
|
@@ -259,6 +259,21 @@ cmd_passenger_buffer_upload(cmd_parms *cmd, void *pcfg, const char *arg) {
|
|
259
259
|
return NULL;
|
260
260
|
}
|
261
261
|
|
262
|
+
static const char *
|
263
|
+
cmd_passenger_custom_error_page(cmd_parms *cmd, void *pcfg, const char *arg) {
|
264
|
+
const char *err = ap_check_cmd_context(cmd, NOT_IN_FILES);
|
265
|
+
if (err != NULL) {
|
266
|
+
return err;
|
267
|
+
}
|
268
|
+
|
269
|
+
DirConfig *config = (DirConfig *) pcfg;
|
270
|
+
config->mCustomErrorPageSourceFile = cmd->directive->filename;
|
271
|
+
config->mCustomErrorPageSourceLine = cmd->directive->line_num;
|
272
|
+
config->mCustomErrorPageExplicitlySet = true;
|
273
|
+
config->mCustomErrorPage = arg;
|
274
|
+
return NULL;
|
275
|
+
}
|
276
|
+
|
262
277
|
static const char *
|
263
278
|
cmd_passenger_data_buffer_dir(cmd_parms *cmd, void *pcfg, const char *arg) {
|
264
279
|
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
@@ -632,8 +632,10 @@ public:
|
|
632
632
|
} // namespace Apache2Module
|
633
633
|
} // namespace Passenger
|
634
634
|
|
635
|
-
#
|
636
|
-
#include "../
|
637
|
-
#include "
|
635
|
+
#if !defined(INTELLISENSE)
|
636
|
+
#include "../ServerConfig/AutoGeneratedManifestGeneration.cpp"
|
637
|
+
#include "../DirConfig/AutoGeneratedManifestGeneration.cpp"
|
638
|
+
#include "AutoGeneratedManifestDefaultsInitialization.cpp"
|
639
|
+
#endif
|
638
640
|
|
639
641
|
#endif /* _PASSENGER_APACHE2_MODULE_CONFIG_GENERAL_MANIFEST_GENERATION_H_ */
|
@@ -75,6 +75,9 @@ createDirConfig_autoGenerated(DirConfig *config) {
|
|
75
75
|
*/
|
76
76
|
config->mBufferResponse = Apache2Module::UNSET;
|
77
77
|
config->mBufferUpload = Apache2Module::UNSET;
|
78
|
+
/*
|
79
|
+
* config->mCustomErrorPage: default initialized
|
80
|
+
*/
|
78
81
|
/*
|
79
82
|
* config->mDirectInstanceRequestAddress: default initialized
|
80
83
|
*/
|
@@ -139,6 +142,7 @@ createDirConfig_autoGenerated(DirConfig *config) {
|
|
139
142
|
config->mBaseURIsSourceLine = 0;
|
140
143
|
config->mBufferResponseSourceLine = 0;
|
141
144
|
config->mBufferUploadSourceLine = 0;
|
145
|
+
config->mCustomErrorPageSourceLine = 0;
|
142
146
|
config->mDirectInstanceRequestAddressSourceLine = 0;
|
143
147
|
config->mEnabledSourceLine = 0;
|
144
148
|
config->mErrorOverrideSourceLine = 0;
|
@@ -177,6 +181,7 @@ createDirConfig_autoGenerated(DirConfig *config) {
|
|
177
181
|
config->mBaseURIsExplicitlySet = false;
|
178
182
|
config->mBufferResponseExplicitlySet = false;
|
179
183
|
config->mBufferUploadExplicitlySet = false;
|
184
|
+
config->mCustomErrorPageExplicitlySet = false;
|
180
185
|
config->mDirectInstanceRequestAddressExplicitlySet = false;
|
181
186
|
config->mEnabledExplicitlySet = false;
|
182
187
|
config->mErrorOverrideExplicitlySet = false;
|
@@ -61,6 +61,9 @@ constructRequestHeaders_autoGenerated(request_rec *r, DirConfig *config, std::st
|
|
61
61
|
addHeader(result, StaticString("!~PASSENGER_APP_LOG_FILE",
|
62
62
|
sizeof("!~PASSENGER_APP_LOG_FILE") - 1),
|
63
63
|
config->mAppLogFile);
|
64
|
+
addHeader(result, StaticString("!~PASSENGER_CUSTOM_ERROR_PAGE",
|
65
|
+
sizeof("!~PASSENGER_CUSTOM_ERROR_PAGE") - 1),
|
66
|
+
config->mCustomErrorPage);
|
64
67
|
addHeader(result, StaticString("!~PASSENGER_DIRECT_INSTANCE_REQUEST_ADDRESS",
|
65
68
|
sizeof("!~PASSENGER_DIRECT_INSTANCE_REQUEST_ADDRESS") - 1),
|
66
69
|
config->mDirectInstanceRequestAddress);
|
@@ -176,6 +176,19 @@ ConfigManifestGenerator::autoGenerated_generateConfigManifestForDirConfig(server
|
|
176
176
|
pdconf->mBufferUploadSourceLine);
|
177
177
|
hierarchyMember["value"] = pdconf->mBufferUpload == Apache2Module::ENABLED;
|
178
178
|
}
|
179
|
+
if (pdconf->mCustomErrorPageExplicitlySet) {
|
180
|
+
findOrCreateAppAndLocOptionsContainers(serverRec, csconf, cdconf,
|
181
|
+
pdconf, context, &appOptionsContainer, &locOptionsContainer);
|
182
|
+
Json::Value &optionContainer = findOrCreateOptionContainer(*appOptionsContainer,
|
183
|
+
"PassengerCustomErrorPage",
|
184
|
+
sizeof("PassengerCustomErrorPage") - 1);
|
185
|
+
Json::Value &hierarchyMember = addOptionContainerHierarchyMember(optionContainer,
|
186
|
+
pdconf->mCustomErrorPageSourceFile,
|
187
|
+
pdconf->mCustomErrorPageSourceLine);
|
188
|
+
hierarchyMember["value"] = Json::Value(
|
189
|
+
pdconf->mCustomErrorPage.data(),
|
190
|
+
pdconf->mCustomErrorPage.data() + pdconf->mCustomErrorPage.size());
|
191
|
+
}
|
179
192
|
if (pdconf->mDirectInstanceRequestAddressExplicitlySet) {
|
180
193
|
findOrCreateAppAndLocOptionsContainers(serverRec, csconf, cdconf,
|
181
194
|
pdconf, context, &appOptionsContainer, &locOptionsContainer);
|
@@ -88,6 +88,10 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
|
|
88
88
|
(add->mBufferUpload != Apache2Module::UNSET)
|
89
89
|
? add->mBufferUpload
|
90
90
|
: base->mBufferUpload;
|
91
|
+
config->mCustomErrorPage =
|
92
|
+
(!add->mCustomErrorPage.empty())
|
93
|
+
? add->mCustomErrorPage
|
94
|
+
: base->mCustomErrorPage;
|
91
95
|
config->mDirectInstanceRequestAddress =
|
92
96
|
(!add->mDirectInstanceRequestAddress.empty())
|
93
97
|
? add->mDirectInstanceRequestAddress
|
@@ -207,6 +211,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
|
|
207
211
|
config->mBaseURIsSourceFile = add->mBaseURIsSourceFile;
|
208
212
|
config->mBufferResponseSourceFile = add->mBufferResponseSourceFile;
|
209
213
|
config->mBufferUploadSourceFile = add->mBufferUploadSourceFile;
|
214
|
+
config->mCustomErrorPageSourceFile = add->mCustomErrorPageSourceFile;
|
210
215
|
config->mDirectInstanceRequestAddressSourceFile = add->mDirectInstanceRequestAddressSourceFile;
|
211
216
|
config->mEnabledSourceFile = add->mEnabledSourceFile;
|
212
217
|
config->mErrorOverrideSourceFile = add->mErrorOverrideSourceFile;
|
@@ -245,6 +250,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
|
|
245
250
|
config->mBaseURIsSourceLine = add->mBaseURIsSourceLine;
|
246
251
|
config->mBufferResponseSourceLine = add->mBufferResponseSourceLine;
|
247
252
|
config->mBufferUploadSourceLine = add->mBufferUploadSourceLine;
|
253
|
+
config->mCustomErrorPageSourceLine = add->mCustomErrorPageSourceLine;
|
248
254
|
config->mDirectInstanceRequestAddressSourceLine = add->mDirectInstanceRequestAddressSourceLine;
|
249
255
|
config->mEnabledSourceLine = add->mEnabledSourceLine;
|
250
256
|
config->mErrorOverrideSourceLine = add->mErrorOverrideSourceLine;
|
@@ -283,6 +289,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
|
|
283
289
|
config->mBaseURIsExplicitlySet = add->mBaseURIsExplicitlySet;
|
284
290
|
config->mBufferResponseExplicitlySet = add->mBufferResponseExplicitlySet;
|
285
291
|
config->mBufferUploadExplicitlySet = add->mBufferUploadExplicitlySet;
|
292
|
+
config->mCustomErrorPageExplicitlySet = add->mCustomErrorPageExplicitlySet;
|
286
293
|
config->mDirectInstanceRequestAddressExplicitlySet = add->mDirectInstanceRequestAddressExplicitlySet;
|
287
294
|
config->mEnabledExplicitlySet = add->mEnabledExplicitlySet;
|
288
295
|
config->mErrorOverrideExplicitlySet = add->mErrorOverrideExplicitlySet;
|
@@ -29,6 +29,9 @@
|
|
29
29
|
#ifdef INTELLISENSE
|
30
30
|
// These includes do nothing, but keep IntelliSense happy.
|
31
31
|
#include <ap_config.h>
|
32
|
+
#include <set>
|
33
|
+
#include <Constants.h>
|
34
|
+
#include <StaticString.h>
|
32
35
|
#include "../ConfigGeneral/Common.h"
|
33
36
|
#endif
|
34
37
|
|
@@ -171,6 +174,11 @@ struct AutoGeneratedDirConfig {
|
|
171
174
|
*/
|
172
175
|
StaticString mAppType;
|
173
176
|
|
177
|
+
/*
|
178
|
+
* Path to html file to use for Passenger generated error pages.
|
179
|
+
*/
|
180
|
+
StaticString mCustomErrorPage;
|
181
|
+
|
174
182
|
/*
|
175
183
|
* The address that Passenger binds to in order to allow sending HTTP requests to individual application processes.
|
176
184
|
*/
|
@@ -265,6 +273,7 @@ struct AutoGeneratedDirConfig {
|
|
265
273
|
StaticString mAppRootSourceFile;
|
266
274
|
StaticString mAppStartCommandSourceFile;
|
267
275
|
StaticString mAppTypeSourceFile;
|
276
|
+
StaticString mCustomErrorPageSourceFile;
|
268
277
|
StaticString mDirectInstanceRequestAddressSourceFile;
|
269
278
|
StaticString mGroupSourceFile;
|
270
279
|
StaticString mMeteorAppSettingsSourceFile;
|
@@ -303,6 +312,7 @@ struct AutoGeneratedDirConfig {
|
|
303
312
|
unsigned int mAppRootSourceLine;
|
304
313
|
unsigned int mAppStartCommandSourceLine;
|
305
314
|
unsigned int mAppTypeSourceLine;
|
315
|
+
unsigned int mCustomErrorPageSourceLine;
|
306
316
|
unsigned int mDirectInstanceRequestAddressSourceLine;
|
307
317
|
unsigned int mGroupSourceLine;
|
308
318
|
unsigned int mMeteorAppSettingsSourceLine;
|
@@ -341,6 +351,7 @@ struct AutoGeneratedDirConfig {
|
|
341
351
|
bool mAppRootExplicitlySet: 1;
|
342
352
|
bool mAppStartCommandExplicitlySet: 1;
|
343
353
|
bool mAppTypeExplicitlySet: 1;
|
354
|
+
bool mCustomErrorPageExplicitlySet: 1;
|
344
355
|
bool mDirectInstanceRequestAddressExplicitlySet: 1;
|
345
356
|
bool mGroupExplicitlySet: 1;
|
346
357
|
bool mMeteorAppSettingsExplicitlySet: 1;
|
@@ -540,6 +551,11 @@ struct AutoGeneratedDirConfig {
|
|
540
551
|
return mAppType;
|
541
552
|
}
|
542
553
|
|
554
|
+
StaticString
|
555
|
+
getCustomErrorPage() const {
|
556
|
+
return mCustomErrorPage;
|
557
|
+
}
|
558
|
+
|
543
559
|
StaticString
|
544
560
|
getDirectInstanceRequestAddress() const {
|
545
561
|
if (mDirectInstanceRequestAddress.empty()) {
|
@@ -36,9 +36,10 @@ def main
|
|
36
36
|
|
37
37
|
#ifdef INTELLISENSE
|
38
38
|
// These includes do nothing, but keep IntelliSense happy.
|
39
|
+
#include <set>
|
39
40
|
#include <StaticString.h>
|
41
|
+
#include <Constants.h>
|
40
42
|
#include <ap_config.h>
|
41
|
-
#include "../ConfigGeneral/Common.h"
|
42
43
|
#endif
|
43
44
|
}
|
44
45
|
|
@@ -83,7 +83,7 @@
|
|
83
83
|
#define PASSENGER_API_VERSION_MAJOR 0
|
84
84
|
#define PASSENGER_API_VERSION_MINOR 3
|
85
85
|
#define PASSENGER_DEFAULT_USER "nobody"
|
86
|
-
#define PASSENGER_VERSION "6.0.
|
86
|
+
#define PASSENGER_VERSION "6.0.24"
|
87
87
|
#define POOL_HELPER_THREAD_STACK_SIZE 262144
|
88
88
|
#define PROCESS_SHUTDOWN_TIMEOUT 60
|
89
89
|
#define PROCESS_SHUTDOWN_TIMEOUT_DISPLAY "1 minute"
|
@@ -257,6 +257,10 @@ psg_lstr_cmp(const LString *str, const StaticString &other) {
|
|
257
257
|
const LString::Part *part;
|
258
258
|
const char *b;
|
259
259
|
|
260
|
+
if (str == NULL) {
|
261
|
+
return false;
|
262
|
+
}
|
263
|
+
|
260
264
|
// Fast check: check length match
|
261
265
|
if (str->size != other.size()) {
|
262
266
|
return false;
|
@@ -28,10 +28,8 @@
|
|
28
28
|
|
29
29
|
#include <ev++.h>
|
30
30
|
#include <vector>
|
31
|
-
#include <list>
|
32
31
|
#include <memory>
|
33
32
|
#include <boost/thread.hpp>
|
34
|
-
#include <boost/scoped_ptr.hpp>
|
35
33
|
#include <boost/shared_ptr.hpp>
|
36
34
|
#include <boost/function.hpp>
|
37
35
|
#include <boost/bind/bind.hpp>
|
@@ -82,7 +80,7 @@ private:
|
|
82
80
|
}
|
83
81
|
|
84
82
|
static void timeoutHandler(int revents, void *arg) {
|
85
|
-
|
83
|
+
std::unique_ptr<Callback> callback((Callback *) arg);
|
86
84
|
(*callback)();
|
87
85
|
}
|
88
86
|
|
@@ -61,13 +61,13 @@ struct RefGuard {
|
|
61
61
|
file(_file),
|
62
62
|
line(_line)
|
63
63
|
{
|
64
|
-
if (_hooks !=
|
64
|
+
if (_hooks != nullptr && _hooks->impl != nullptr) {
|
65
65
|
_hooks->impl->hook_ref(_hooks, _source, _file, _line);
|
66
66
|
}
|
67
67
|
}
|
68
68
|
|
69
69
|
~RefGuard() {
|
70
|
-
if (hooks !=
|
70
|
+
if (hooks != nullptr && hooks->impl != nullptr) {
|
71
71
|
hooks->impl->hook_unref(hooks, source, file, line);
|
72
72
|
}
|
73
73
|
}
|